Performance profiling of JSON libraries (Compiled and run on Linux 6.8.0-1017-azure using the Clang 20.0.0 compiler).
Latest Results: (Jan 20, 2025)
Using the following commits:
| Jsonifier: 431c91e
| Glaze: 37c19d1
| Simdjson: 5642bb9
1200 iterations on a (AMD EPYC 7763 64-Core Processor), where the most stable 20 subsequent iterations are sampled.
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
982.747
2.60509
2.4938e+06
78592
76274.1
973.615
3.6757
2.51982e+06
78592
77031.6
glaze
604.981
4.9157
4.05156e+06
78592
123964
887.275
3.59659
2.76342e+06
78592
84512.1
simdjson
590.682
3.04623
4.14647e+06
78592
126929
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
696.927
1.97505
3.51775e+06
44877
61415.8
1024.65
2.75116
2.3959e+06
44877
41778.3
jsonifier
693.207
2.51186
3.53818e+06
44877
61745.5
832.588
4.42051
2.94981e+06
44877
51445
simdjson
455.035
2.18057
5.38478e+06
44877
94062.3
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
667.887
4.75261
3.83459e+06
2927
4182.53
692.901
4.71667
3.67521e+06
2927
4033.47
simdjson
592.38
4.97706
4.27825e+06
2927
4715.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
431.571
4.13649
5.88665e+06
1678
3709.45
371.066
4.96647
6.86226e+06
1678
4322.56
simdjson
222.307
4.83264
1.13992e+07
1678
7202.94
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
970.206
2.19795
2.52536e+06
78592
77261.6
990.526
2.66026
2.47441e+06
78592
75701.1
glaze
836.848
3.08437
2.9311e+06
78592
89584.6
1444.4
1.49628
1.69711e+06
78592
51896.8
simdjson
767.001
0.787093
3.1935e+06
78592
97721.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)
glaze
697.206
2.90085
3.51614e+06
44877
61390.8
1133.75
1.82763
2.16603e+06
44877
37755.9
jsonifier
689.015
1.2137
3.5571e+06
44877
62118.1
826.782
4.19458
2.96773e+06
44877
51793.7
simdjson
448.769
2.10982
5.46055e+06
44877
95372.6
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
1592.21
2.68576
1.53983e+06
94378
56542.6
1929.46
2.20307
1.2714e+06
94378
46655.1
glaze
1127.72
1.21144
2.17396e+06
94378
79815.8
1296.79
1.34498
1.88935e+06
94378
69410.2
simdjson
732.508
1.13016
3.34216e+06
105406
137239
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
1213.38
2.47551
2.02269e+06
56377
44319.3
989.411
3.31862
2.47951e+06
56377
54364.7
glaze
851.769
1.86419
2.87749e+06
56377
63131.9
1659.47
1.91609
1.48038e+06
56377
32404.8
simdjson
436.331
1.12707
5.61146e+06
61629
134707
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
1050.1
0.289113
2.32883e+06
6661897
6.05018e+06
747.676
4.28402
3.28085e+06
6661897
8.52358e+06
jsonifier
727.781
4.57837
3.36532e+06
6661897
8.74287e+06
1168.56
2.98403
2.09688e+06
6661897
5.44749e+06
simdjson
707.065
0.240695
3.4586e+06
6661897
8.98545e+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
480.226
0.331612
5.09239e+06
2090234
4.15098e+06
460.766
0.613744
5.30761e+06
2090234
4.32634e+06
glaze
445.232
0.360189
5.49266e+06
2090234
4.47724e+06
461.946
1.45623
5.29897e+06
2090234
4.31935e+06
simdjson
264.742
1.63649
9.23899e+06
2090234
7.53104e+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
1711.98
0.954698
1.42898e+06
1439562
801964
2553.6
0.971975
958557
1439562
537661
glaze
1554.24
1.45075
1.57414e+06
1439584
883413
1786.32
1.48466
1.36968e+06
1439584
768648
simdjson
976
0.569937
2.50632e+06
1423415
1.39087e+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
1178.51
3.16042
2.07713e+06
500299
405080
1884.2
2.69211
1.29966e+06
500299
253280
glaze
1037
1.47526
2.35954e+06
500299
460158
1553.64
2.22568
1.57584e+06
500299
307156
simdjson
364.731
0.537479
6.70582e+06
492910
1.28885e+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
1765.05
2.89992
1.40236e+06
44653
24138.3
3197.65
3.11778
776892
44653
13323.1
simdjson
1413.91
2.33391
1.74206e+06
44653
30126.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
1702.63
3.63199
1.45441e+06
37543
21040
3344.77
3.13639
752200
37543
10708.7
simdjson
1116.51
3.50696
2.21554e+06
37543
32087.3
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
1688.63
1.38884
1.449e+06
719139
406198
2400.48
1.91989
1.01964e+06
719139
285780
glaze
1232.4
0.985987
1.98508e+06
719139
556528
1740.59
1.6042
1.40584e+06
719139
394072
simdjson
949.266
0.689687
2.57728e+06
723784
727174
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
1519.8
2.08526
1.61014e+06
477706
299804
2228.25
3.41211
1.09911e+06
477706
204529
glaze
1185.2
1.73272
2.06444e+06
477706
384426
1780.43
2.74588
1.37543e+06
477706
255969
simdjson
657.406
0.465212
3.72078e+06
479183
695138
Library
Write (MB/S)
Write Percentage Deviation (+/-%)
Write (Cycles/MB)
Write Length (Bytes)
Write Time (ns)
jsonifier
1086.64
0.707644
2.25263e+06
466906
409778
glaze
1047.76
0.843822
2.33546e+06
466906
424986
simdjson
515.28
0.982481
4.74712e+06
466906
864211
Library
Write (MB/S)
Write Percentage Deviation (+/-%)
Write (Cycles/MB)
Write Length (Bytes)
Write Time (ns)
glaze
1576.01
1.14201
1.55315e+06
699405
423257
jsonifier
1512.52
0.953546
1.61793e+06
699405
441001
Library
Read (MB/S)
Read Percentage Deviation (+/-%)
Read (Cycles/MB)
Read Length (Bytes)
Read Time (ns)
jsonifier
2363.22
2.41744
1.03578e+06
631515
254905
glaze
2317.73
1.40621
1.05645e+06
631515
259857