You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This module provides benchmarking tools to compare the performance of JSON5 serialization/deserialization against standard JSON using kotlinx.serialization.
3
+
This module provides benchmarking tools to compare the performance of JSON5 serialization/deserialization across three different implementations:
- Contains human-readable performance comparisons across all three libraries
35
+
- Shows relative performance comparisons between each pair of libraries
36
+
- Includes overall statistics and rankings
33
37
34
38
## Test Data Types
35
39
@@ -59,39 +63,37 @@ To run the benchmark module tests:
59
63
60
64
## Sample Results
61
65
62
-
Based on typical runs, JSON standard library generally performs 2-6x faster than JSON5 for both serialization and deserialization, with the performance gap being larger for more complex data structures.
66
+
Based on typical runs across the three libraries:
67
+
68
+
-**JSON** (kotlinx.serialization) is consistently the fastest
69
+
-**External-JSON5** performs better than this project's JSON5 implementation
70
+
-**JSON5** (this project) offers kotlinx.serialization integration but with slower performance
-**JSON** is **3.90×** faster than **JSON5** and **2.75×** faster than **External-JSON5**
92
+
-**External-JSON5** is **1.42×** faster than **JSON5**
93
+
94
+
## Key Insights
95
+
96
+
-**kotlinx.serialization JSON** remains the performance leader
97
+
-**External JSON5 library** provides a good balance of JSON5 features with reasonable performance
98
+
-**This project's JSON5** offers seamless kotlinx.serialization integration but at a performance cost
99
+
- Choose based on your priorities: performance (JSON), JSON5 features with good performance (External-JSON5), or kotlinx.serialization integration (this project)
0 commit comments