Performance profiling of JSON libraries (Compiled and run on Linux 6.8.0-1020-azure using the Clang 20.0.0 compiler).
Latest Results: (Jan 28, 2025)
Using the following commits:
| Jsonifier: 2ad3bb1
| Glaze: 514e532
| Simdjson: e422933
1400 iterations on a (AMD EPYC 7763 64-Core Processor), where the most stable 20 subsequent iterations are sampled.
These benchmarks were executed using the CPU benchmark library BenchmarkSuite .
Library
Read (MB/S)
Read Percentage Deviation (+/-%)
Read (Cycles/MB)
Read Length (Bytes)
Read Time (ns)
Write (MB/S)
Write Percentage Deviation (+/-%)
Write (Cycles/MB)
Write Length (Bytes)
Write Time (ns)
jsonifier
963.724
2.58836
2.55331e+06
52944
52348
1281.19
2.90198
1.91778e+06
51305
38173.7
glaze
653.217
5.52435
3.75016e+06
51852
75712.8
1114.83
3.62856
2.19783e+06
49552
42354
simdjson
472.248
9.32077
5.25005e+06
51599
105517
Library
Read (MB/S)
Read Percentage Deviation (+/-%)
Read (Cycles/MB)
Read Length (Bytes)
Read Time (ns)
Write (MB/S)
Write Percentage Deviation (+/-%)
Write (Cycles/MB)
Write Length (Bytes)
Write Time (ns)
jsonifier
783.894
3.23009
3.13786e+06
36053
43851.7
1130.42
3.61847
2.18214e+06
36393
30688.7
glaze
779.445
2.76525
3.15734e+06
38173
46680.5
1005
3.73417
2.44165e+06
35470
33692.4
simdjson
457.537
3.06387
5.36122e+06
36913
76939.4
Library
Read (MB/S)
Read Percentage Deviation (+/-%)
Read (Cycles/MB)
Read Length (Bytes)
Read Time (ns)
Write (MB/S)
Write Percentage Deviation (+/-%)
Write (Cycles/MB)
Write Length (Bytes)
Write Time (ns)
jsonifier
286.528
44.173
9.38437e+06
945
3042.75
459.502
41.7167
5.84816e+06
872
1761.6
simdjson
213.47
30.5452
1.23937e+07
865
3721.5
Library
Read (MB/S)
Read Percentage Deviation (+/-%)
Read (Cycles/MB)
Read Length (Bytes)
Read Time (ns)
Write (MB/S)
Write Percentage Deviation (+/-%)
Write (Cycles/MB)
Write Length (Bytes)
Write Time (ns)
jsonifier
235.781
37.4155
1.08986e+07
613
2404.5
373.138
39.9688
7.02502e+06
595
1458
simdjson
171.62
35.8031
1.44997e+07
635
3377.75
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 (Cycles/MB)
Read Length (Bytes)
Read Time (ns)
Write (MB/S)
Write Percentage Deviation (+/-%)
Write (Cycles/MB)
Write Length (Bytes)
Write Time (ns)
jsonifier
896.371
1.84275
2.7385e+06
52490
55857.6
1281.52
3.51554
1.91791e+06
50540
37593.8
glaze
618.613
5.70115
3.96848e+06
48918
75501.1
1211.55
4.24615
2.02374e+06
50565
39805.8
simdjson
479.897
8.50462
5.17169e+06
49630
99990.9
Library
Read (MB/S)
Read Percentage Deviation (+/-%)
Read (Cycles/MB)
Read Length (Bytes)
Read Time (ns)
Write (MB/S)
Write Percentage Deviation (+/-%)
Write (Cycles/MB)
Write Length (Bytes)
Write Time (ns)
glaze
747.423
3.22732
3.27713e+06
35512
45264.3
1116.3
3.10548
2.20166e+06
36554
31286.8
jsonifier
699.299
3.08281
3.50828e+06
36794
50131.8
1104.73
3.85406
2.22257e+06
34563
29812.7
simdjson
472.393
2.44148
5.18608e+06
36507
73663.5
Library
Read (MB/S)
Read Percentage Deviation (+/-%)
Read (Cycles/MB)
Read Length (Bytes)
Read Time (ns)
Write (MB/S)
Write Percentage Deviation (+/-%)
Write (Cycles/MB)
Write Length (Bytes)
Write Time (ns)
jsonifier
1548.19
2.50829
1.58422e+06
94378
58148.8
1694.68
1.55552
1.44641e+06
94378
53119.6
glaze
1149.62
0.880273
2.13204e+06
94378
78294.9
1441.53
2.08641
1.6995e+06
94378
62447.2
simdjson
727.403
0.935203
3.36482e+06
105406
138199
Library
Read (MB/S)
Read Percentage Deviation (+/-%)
Read (Cycles/MB)
Read Length (Bytes)
Read Time (ns)
Write (MB/S)
Write Percentage Deviation (+/-%)
Write (Cycles/MB)
Write Length (Bytes)
Write Time (ns)
jsonifier
1215.82
3.18432
2.01734e+06
56377
44232
1353.43
1.58526
1.81656e+06
56377
39728.3
glaze
980.717
1.56315
2.49808e+06
56377
54825
1560.15
1.07177
1.57288e+06
56377
34463.8
simdjson
437.831
1.89714
5.59256e+06
61629
134250
Library
Read (MB/S)
Read Percentage Deviation (+/-%)
Read (Cycles/MB)
Read Length (Bytes)
Read Time (ns)
Write (MB/S)
Write Percentage Deviation (+/-%)
Write (Cycles/MB)
Write Length (Bytes)
Write Time (ns)
glaze
920.235
0.430338
2.65749e+06
6661897
6.90404e+06
735.369
4.58956
3.33143e+06
6661897
8.65495e+06
jsonifier
721.163
1.67615
3.39169e+06
6661897
8.81138e+06
1162.68
3.08797
2.10814e+06
6661897
5.47672e+06
simdjson
706.538
0.279532
3.46126e+06
6661897
8.99216e+06
Library
Read (MB/S)
Read Percentage Deviation (+/-%)
Read (Cycles/MB)
Read Length (Bytes)
Read Time (ns)
Write (MB/S)
Write Percentage Deviation (+/-%)
Write (Cycles/MB)
Write Length (Bytes)
Write Time (ns)
jsonifier
465.962
0.381773
5.24843e+06
2090234
4.27805e+06
450.346
0.693466
5.43068e+06
2090234
4.42649e+06
glaze
450.238
0.3006
5.43184e+06
2090234
4.42746e+06
451.843
1.87115
5.41925e+06
2090234
4.41704e+06
simdjson
274.404
0.185111
8.91229e+06
2090234
7.26448e+06
Library
Read (MB/S)
Read Percentage Deviation (+/-%)
Read (Cycles/MB)
Read Length (Bytes)
Read Time (ns)
Write (MB/S)
Write Percentage Deviation (+/-%)
Write (Cycles/MB)
Write Length (Bytes)
Write Time (ns)
jsonifier
1868.31
0.784414
1.30943e+06
1439562
734849
2527.09
1.19354
968391
1439562
543297
glaze
1558.85
0.548521
1.56918e+06
1439584
880732
1783.25
1.03949
1.37196e+06
1439584
769948
simdjson
977.734
0.428828
2.50151e+06
1423415
1.3884e+06
Library
Read (MB/S)
Read Percentage Deviation (+/-%)
Read (Cycles/MB)
Read Length (Bytes)
Read Time (ns)
Write (MB/S)
Write Percentage Deviation (+/-%)
Write (Cycles/MB)
Write Length (Bytes)
Write Time (ns)
jsonifier
1188.04
1.71217
2.05951e+06
500299
401653
1847.34
1.56421
1.32511e+06
500299
258308
glaze
1036.44
1.26124
2.3606e+06
500299
460395
1478.05
2.10137
1.65631e+06
500299
322865
simdjson
363.019
0.476474
6.73803e+06
492910
1.29493e+06
Library
Read (MB/S)
Read Percentage Deviation (+/-%)
Read (Cycles/MB)
Read Length (Bytes)
Read Time (ns)
Write (MB/S)
Write Percentage Deviation (+/-%)
Write (Cycles/MB)
Write Length (Bytes)
Write Time (ns)
jsonifier
1803.66
3.69535
1.37316e+06
44653
23625.5
2433.6
2.15558
1.01796e+06
44653
17502.1
simdjson
1390.57
2.53088
1.77189e+06
44653
30633.7
Library
Read (MB/S)
Read Percentage Deviation (+/-%)
Read (Cycles/MB)
Read Length (Bytes)
Read Time (ns)
Write (MB/S)
Write Percentage Deviation (+/-%)
Write (Cycles/MB)
Write Length (Bytes)
Write Time (ns)
jsonifier
1540.37
4.17354
1.62378e+06
37543
23265.8
2629.94
2.79953
942192
37543
13621.4
simdjson
1161.26
3.67759
2.11975e+06
37543
30858.8
Library
Read (MB/S)
Read Percentage Deviation (+/-%)
Read (Cycles/MB)
Read Length (Bytes)
Read Time (ns)
Write (MB/S)
Write Percentage Deviation (+/-%)
Write (Cycles/MB)
Write Length (Bytes)
Write Time (ns)
jsonifier
1745.72
1.76597
1.40176e+06
719141
392933
1996.29
1.29216
1.22605e+06
719141
343574
glaze
1216.51
1.23633
2.01098e+06
719141
563806
1659.93
1.7423
1.47419e+06
719141
413236
simdjson
938.422
0.861639
2.6069e+06
723786
735580
Library
Read (MB/S)
Read Percentage Deviation (+/-%)
Read (Cycles/MB)
Read Length (Bytes)
Read Time (ns)
Write (MB/S)
Write Percentage Deviation (+/-%)
Write (Cycles/MB)
Write Length (Bytes)
Write Time (ns)
jsonifier
1574.76
1.69475
1.55408e+06
477708
289323
1785.58
2.19417
1.37096e+06
477708
255217
glaze
1169.67
0.809239
2.09163e+06
477708
389509
1894.51
1.92292
1.29253e+06
477708
240516
simdjson
652.359
0.621141
3.74986e+06
479185
700537
Library
Write (MB/S)
Write Percentage Deviation (+/-%)
Write (Cycles/MB)
Write Length (Bytes)
Write Time (ns)
jsonifier
1163.49
0.421449
2.10343e+06
466906
382708
glaze
1141.66
0.536996
2.14302e+06
466906
390030
simdjson
507.348
0.795043
4.82133e+06
466906
877687
Library
Write (MB/S)
Write Percentage Deviation (+/-%)
Write (Cycles/MB)
Write Length (Bytes)
Write Time (ns)
glaze
1595.89
1.31724
1.53355e+06
699405
417995
jsonifier
1549.14
0.98545
1.57973e+06
699405
430595
Library
Read (MB/S)
Read Percentage Deviation (+/-%)
Read (Cycles/MB)
Read Length (Bytes)
Read Time (ns)
jsonifier
2502.82
1.82941
978095
631515
240672
glaze
2362.88
0.683486
1.03621e+06
631515
254885