Skip to content

Commit 4ec3a22

Browse files
authored
Merge pull request #57 from hossain-khan/copilot/fix-56
Update benchmark README with latest performance data and add interactive HTML visualization
2 parents 757251c + eaebf51 commit 4ec3a22

File tree

2 files changed

+467
-11
lines changed

2 files changed

+467
-11
lines changed

benchmark/README.md

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,13 @@ The benchmark generates two types of reports:
3535
- Shows relative performance comparisons between each pair of libraries
3636
- Includes overall statistics and rankings
3737

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+
3845
## Test Data Types
3946

4047
The benchmark tests the following data structures:
@@ -71,25 +78,29 @@ Based on typical runs across the three libraries:
7178

7279
Example output:
7380
```
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
7784
```
7885

7986
### Benchmark Result Snapshot
8087

8188
| Case | Type | JSON5 (ms) | JSON (ms) | External-JSON5 (ms) | Performance Ranking |
8289
| ------------------- | --------------- | ---------- | --------- | ------------------- | ------------------- |
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 |
89100

90101
**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**
93104

94105
## Key Insights
95106

0 commit comments

Comments
 (0)