Performance profiling of JSON libraries (Compiled and run on Darwin 23.6.0 using the Clang 19.1.5 compiler).
Latest Results: (Jan 06, 2025)
Using the following commits:
| Jsonifier: 6b1c240
| Glaze: ac09e84
| Simdjson: 5488dca
100 iterations on a (Apple M1 (Virtual)).
Library
Read (MB/S)
Read Percentage Deviation (+/-%)
Read Length (Bytes)
Read Time (ns)
Write (MB/S)
Write Percentage Deviation (+/-%)
Write Length (Bytes)
Write Time (ns)
jsonifier
1995.58
1.86902
461303
1.10227e+07
1766.89
22.3186
461303
1.24494e+07
glaze
1719.15
2.50128
461303
1.2795e+07
2477.55
6.06839
461303
8.87837e+06
simdjson
863.495
9.58079
461303
2.5474e+07
Library
Read (MB/S)
Read Percentage Deviation (+/-%)
Read Length (Bytes)
Read Time (ns)
Write (MB/S)
Write Percentage Deviation (+/-%)
Write Length (Bytes)
Write Time (ns)
jsonifier
1707.72
2.81133
345233
9.63976e+06
2148.15
22.1129
345233
7.66333e+06
glaze
1617.41
4.98282
345233
1.0178e+07
2214.24
5.87305
345233
7.43459e+06
simdjson
658.899
15.9048
345233
2.49841e+07
Library
Read (MB/S)
Read Percentage Deviation (+/-%)
Read Length (Bytes)
Read Time (ns)
Write (MB/S)
Write Percentage Deviation (+/-%)
Write Length (Bytes)
Write Time (ns)
simdjson
163.965
4.85922
20202
5.87508e+06
jsonifier
118.585
3.08336
20202
8.12337e+06
4738.49
12.9094
20202
203294
Library
Read (MB/S)
Read Percentage Deviation (+/-%)
Read Length (Bytes)
Read Time (ns)
Write (MB/S)
Write Percentage Deviation (+/-%)
Write Length (Bytes)
Write Time (ns)
simdjson
151.134
6.22495
15456
4.87646e+06
jsonifier
146.038
5.42396
15456
5.04663e+06
1775.9
58.3253
15456
415000
The JSON documents in the previous tests featured keys ranging from "a" to "z", where each key corresponds to an array of values. Notably, the documents in this test arrange these keys in reverse order, deviating from the typical "a" to "z" arrangement.
This test effectively demonstrates the challenges encountered when utilizing simdjson and iterative parsers that lack the ability to efficiently allocate memory locations throughhashing. In cases where the keys are not in the expected sequence, performance is significantly compromised, with the severity escalating as the document size increases.
In contrast, hash-based solutions offer a viable alternative by circumventing these issues and maintaining optimal performance regardless of the JSON document's scale, or ordering of the keys being parsed.
Library
Read (MB/S)
Read Percentage Deviation (+/-%)
Read Length (Bytes)
Read Time (ns)
Write (MB/S)
Write Percentage Deviation (+/-%)
Write Length (Bytes)
Write Time (ns)
jsonifier
1972.42
4.46494
461303
1.11521e+07
2425.25
5.7772
461303
9.06983e+06
glaze
1756.45
3.66302
461303
1.25233e+07
2506.67
7.74223
461303
8.77525e+06
simdjson
367.705
9.09746
461303
5.98214e+07
Library
Read (MB/S)
Read Percentage Deviation (+/-%)
Read Length (Bytes)
Read Time (ns)
Write (MB/S)
Write Percentage Deviation (+/-%)
Write Length (Bytes)
Write Time (ns)
glaze
1667.15
2.10278
345233
9.87434e+06
2302.3
6.06346
345233
7.15025e+06
jsonifier
1540.42
9.58396
345233
1.06867e+07
1919.35
27.0812
345233
8.57687e+06
simdjson
297.538
4.7676
345233
5.53273e+07
Library
Read (MB/S)
Read Percentage Deviation (+/-%)
Read Length (Bytes)
Read Time (ns)
Write (MB/S)
Write Percentage Deviation (+/-%)
Write Length (Bytes)
Write Time (ns)
jsonifier
2242.57
6.80345
138774
2.95075e+06
3126.7
5.2032
138774
2.11637e+06
glaze
1756.83
2.65185
138774
3.76658e+06
3205.07
2.62615
138774
2.06462e+06
simdjson
1390.68
5.31648
138482
4.74829e+06
Library
Read (MB/S)
Read Percentage Deviation (+/-%)
Read Length (Bytes)
Read Time (ns)
Write (MB/S)
Write Percentage Deviation (+/-%)
Write Length (Bytes)
Write Time (ns)
glaze
1456.45
5.61434
69037
2.26025e+06
3473.44
8.11894
69037
947747
jsonifier
1250.14
3.79573
69037
2.63325e+06
2388.21
6.29455
69037
1.37842e+06
simdjson
668.471
14.9886
68745
4.90375e+06
Library
Read (MB/S)
Read Percentage Deviation (+/-%)
Read Length (Bytes)
Read Time (ns)
Write (MB/S)
Write Percentage Deviation (+/-%)
Write Length (Bytes)
Write Time (ns)
jsonifier
2984.08
4.0244
6661897
1.06453e+08
2769.71
2.12584
6661897
1.14692e+08
glaze
2508.07
5.32329
6661897
1.26657e+08
2104.49
3.82846
6661897
1.50946e+08
simdjson
1105.55
2.32822
6661897
2.87336e+08
Library
Read (MB/S)
Read Percentage Deviation (+/-%)
Read Length (Bytes)
Read Time (ns)
Write (MB/S)
Write Percentage Deviation (+/-%)
Write Length (Bytes)
Write Time (ns)
glaze
1186.69
0.640541
2090234
8.399e+07
906.699
1.31268
2090234
1.09926e+08
jsonifier
1105.99
0.894424
2090234
9.01185e+07
893.483
3.01074
2090234
1.11552e+08
simdjson
345.201
6.64303
2090234
2.8873e+08
Library
Read (MB/S)
Read Percentage Deviation (+/-%)
Read Length (Bytes)
Read Time (ns)
Write (MB/S)
Write Percentage Deviation (+/-%)
Write Length (Bytes)
Write Time (ns)
jsonifier
3254.76
4.79398
1439562
2.10902e+07
9950.94
7.64487
1439562
6.89821e+06
glaze
2493.93
2.07273
1439584
2.75247e+07
3910.73
2.67515
1439584
1.75529e+07
simdjson
1826.32
1.93306
1423415
3.71642e+07
Library
Read (MB/S)
Read Percentage Deviation (+/-%)
Read Length (Bytes)
Read Time (ns)
Write (MB/S)
Write Percentage Deviation (+/-%)
Write Length (Bytes)
Write Time (ns)
jsonifier
1799.83
11.1947
500299
1.32547e+07
5801.24
2.27362
500299
4.11225e+06
glaze
1180.43
32.4378
500299
2.02098e+07
2640.87
2.4915
500299
9.03342e+06
simdjson
679.551
2.65549
492910
3.45872e+07
Library
Read (MB/S)
Read Percentage Deviation (+/-%)
Read Length (Bytes)
Read Time (ns)
Write (MB/S)
Write Percentage Deviation (+/-%)
Write Length (Bytes)
Write Time (ns)
simdjson
196.655
1.75177
44653
1.08272e+07
jsonifier
179.829
6.53365
44653
1.18402e+07
8008.35
7.55054
44653
265875
Library
Read (MB/S)
Read Percentage Deviation (+/-%)
Read Length (Bytes)
Read Time (ns)
Write (MB/S)
Write Percentage Deviation (+/-%)
Write Length (Bytes)
Write Time (ns)
simdjson
183.231
2.10359
37543
9.77012e+06
jsonifier
174.095
13.5695
37543
1.02828e+07
3126.05
57.0781
37543
572668
Library
Read (MB/S)
Read Percentage Deviation (+/-%)
Read Length (Bytes)
Read Time (ns)
Write (MB/S)
Write Percentage Deviation (+/-%)
Write Length (Bytes)
Write Time (ns)
jsonifier
2626.58
7.76503
719139
1.30555e+07
3979.06
2.91561
719139
8.61792e+06
glaze
2197.1
3.4653
719139
1.56075e+07
3099.91
22.3504
719139
1.1062e+07
simdjson
1112.94
13.4904
723784
3.10105e+07
Library
Read (MB/S)
Read Percentage Deviation (+/-%)
Read Length (Bytes)
Read Time (ns)
Write (MB/S)
Write Percentage Deviation (+/-%)
Write Length (Bytes)
Write Time (ns)
jsonifier
2312.06
4.35656
477706
9.85217e+06
4062.65
3.91262
477706
5.60688e+06
glaze
2186.55
2.0894
477706
1.04177e+07
4387.61
2.88864
477706
5.19162e+06
simdjson
925.523
2.44903
479183
2.46879e+07
Library
Write (MB/S)
Write Percentage Deviation (+/-%)
Write Length (Bytes)
Write Time (ns)
glaze
1484.75
3.00935
466906
1.4995e+07
jsonifier
1246.33
1.50983
466906
1.78635e+07
simdjson
935.311
4.60007
631514
3.21956e+07
Library
Write (MB/S)
Write Percentage Deviation (+/-%)
Write Length (Bytes)
Write Time (ns)
glaze
2031.67
3.98879
699405
1.64152e+07
jsonifier
1663.03
1.58828
699405
2.00539e+07
Library
Read (MB/S)
Read Percentage Deviation (+/-%)
Read Length (Bytes)
Read Time (ns)
glaze
2279.6
2.1242
631514
1.32098e+07
jsonifier
1130.02
1.11136
631514
2.66482e+07