@@ -35,6 +35,13 @@ The benchmark generates two types of reports:
35
35
- Shows relative performance comparisons between each pair of libraries
36
36
- Includes overall statistics and rankings
37
37
38
+ ### Interactive Visualization
39
+ - File: ` benchmark_visualization.html `
40
+ - Self-contained HTML file with interactive charts using Chart.js
41
+ - Provides visual comparison of performance across all three libraries
42
+ - Includes multiple chart types: bar charts, doughnut charts, and performance ratios
43
+ - Can be opened directly in any web browser
44
+
38
45
## Test Data Types
39
46
40
47
The benchmark tests the following data structures:
@@ -71,25 +78,29 @@ Based on typical runs across the three libraries:
71
78
72
79
Example output:
73
80
```
74
- SimplePerson Serialization: JSON5=0.028ms , JSON=0.010ms, External-JSON5=0.011ms
75
- ComplexPerson Serialization: JSON5=0.073ms , JSON=0.018ms, External-JSON5=0.018ms
76
- Company Serialization: JSON5=0.163ms , JSON=0.031ms , External-JSON5=0.054ms
81
+ SimplePerson Serialization: JSON5=0.031ms , JSON=0.010ms, External-JSON5=0.011ms
82
+ ComplexPerson Serialization: JSON5=0.084ms , JSON=0.018ms, External-JSON5=0.033ms
83
+ Company Serialization: JSON5=0.233ms , JSON=0.056ms , External-JSON5=0.073ms
77
84
```
78
85
79
86
### Benchmark Result Snapshot
80
87
81
88
| Case | Type | JSON5 (ms) | JSON (ms) | External-JSON5 (ms) | Performance Ranking |
82
89
| ------------------- | --------------- | ---------- | --------- | ------------------- | ------------------- |
83
- | SimplePerson | Serialization | 0.028 | 0.010 | 0.011 | JSON > Ext-JSON5 > JSON5 |
84
- | SimplePerson | Deserialization | 0.049 | 0.014 | 0.017 | JSON > Ext-JSON5 > JSON5 |
85
- | ComplexPerson | Serialization | 0.073 | 0.018 | 0.018 | JSON ≈ Ext-JSON5 > JSON5 |
86
- | ComplexPerson | Deserialization | 0.101 | 0.021 | 0.020 | Ext-JSON5 > JSON > JSON5 |
87
- | Company | Serialization | 0.163 | 0.031 | 0.054 | JSON > Ext-JSON5 > JSON5 |
88
- | Company | Deserialization | 0.200 | 0.081 | 0.117 | JSON > Ext-JSON5 > JSON5 |
90
+ | SimplePerson | Serialization | 0.031 | 0.010 | 0.011 | JSON > Ext-JSON5 > JSON5 |
91
+ | SimplePerson | Deserialization | 0.045 | 0.013 | 0.017 | JSON > Ext-JSON5 > JSON5 |
92
+ | ComplexPerson | Serialization | 0.084 | 0.018 | 0.033 | JSON > Ext-JSON5 > JSON5 |
93
+ | ComplexPerson | Deserialization | 0.093 | 0.028 | 0.030 | JSON > Ext-JSON5 > JSON5 |
94
+ | Company | Serialization | 0.233 | 0.056 | 0.073 | JSON > Ext-JSON5 > JSON5 |
95
+ | Company | Deserialization | 0.242 | 0.082 | 0.143 | JSON > Ext-JSON5 > JSON5 |
96
+ | NumberTypes | Serialization | 0.031 | 0.004 | 0.008 | JSON > Ext-JSON5 > JSON5 |
97
+ | NumberTypes | Deserialization | 0.019 | 0.002 | 0.009 | JSON > Ext-JSON5 > JSON5 |
98
+ | CollectionTypes | Serialization | 0.060 | 0.013 | 0.012 | Ext-JSON5 > JSON > JSON5 |
99
+ | CollectionTypes | Deserialization | 0.055 | 0.013 | 0.030 | JSON > Ext-JSON5 > JSON5 |
89
100
90
101
** Overall Performance Comparison:**
91
- - ** JSON** is ** 3.90 ×** faster than ** JSON5** and ** 2.75 ×** faster than ** External-JSON5**
92
- - ** External-JSON5** is ** 1.42 ×** faster than ** JSON5**
102
+ - ** JSON** is ** 4.45 ×** faster than ** JSON5** and ** 2.51 ×** faster than ** External-JSON5**
103
+ - ** External-JSON5** is ** 1.77 ×** faster than ** JSON5**
93
104
94
105
## Key Insights
95
106
0 commit comments