Skip to content

Latest commit

 

History

History
373 lines (272 loc) · 41.9 KB

File metadata and controls

373 lines (272 loc) · 41.9 KB

Json-Performance

Performance profiling of JSON libraries (Compiled and run on Linux 6.11.0-1018-azure using the GNU 14.2.0 compiler).

Latest Results: (Dec 12, 2025)

Using the following commits:


| Jsonifier: 28dfa9b
| Glaze: d8a8fb9
| Simdjson: ae32422

1400 iterations on a (AMD EPYC 7763 64-Core Processor), where the most stable 20 subsequent iterations are sampled.

Note:

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 169.201 4.83068 1.436e+07 909 5128.5 176.314 4.30672 1.37749e+07 898 4861.45
glaze 160.55 4.86855 1.51328e+07 909 5404 103.375 5.14786 2.35753e+07 911 8413
simdjson 109.908 5.84164 2.21594e+07 919 7979.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 461.185 2.79325 5.28197e+06 4356 9008.2 747.816 3.81063 3.24794e+06 4276 5454.2
glaze 293.389 3.1506 8.31567e+06 4295 13967.9 517.553 3.43504 4.7024e+06 4370 8054.15
simdjson 214.327 5.81438 1.14056e+07 4288 19108.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 748.458 1.38464 3.2172e+06 1938 2469.5 1028.26 2.9281 2.33422e+06 1942 1802.25
glaze 338.138 3.23049 7.18431e+06 1939 5475.25 303.874 2.64511 7.99969e+06 1940 6091.75
simdjson 189.205 2.06523 1.28768e+07 1939 9775.05

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 677.4 2.03434 3.56045e+06 1938 2729.7 951.54 2.25097 2.52194e+06 1938 1942.75
glaze 348.676 2.90814 6.9702e+06 1942 5314.7 300.408 2.16047 8.09673e+06 1938 6157
simdjson 189.189 1.91718 1.28802e+07 1936 9762.2

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 355.168 3.48966 6.69656e+06 450 1210.85 390.178 1.75686 6.06543e+06 450 1100.1
glaze 133.753 8.9472 1.80634e+07 447 3200.95 88.7824 4.52282 2.73801e+07 450 4849.15
simdjson 55.9122 2.01876 4.35817e+07 448 7649.55

Json Test (Prettified) Results (View the data used in the following test):


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)
simdjson 1142.73 3.0409 2.14026e+06 49196 41101
glaze 1013.94 2.49576 2.40983e+06 47432 44612.7 1422.02 2.48389 1.71541e+06 47758 31987
jsonifier 597.239 13.2804 4.10268e+06 50512 80895.5 1488.23 1.51159 1.64066e+06 49381 31638.9

Json Test (Minified) Results (View the data used in the following test):


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)
simdjson 851.051 2.84043 2.87206e+06 34472 38648.8
glaze 838.955 1.59453 2.91267e+06 34200 38884.4 1210.55 3.76621 2.02127e+06 35915 28347.3
jsonifier 823.196 1.16487 2.96803e+06 35710 41373.2 1281.64 1.80153 1.90568e+06 35710 26581.7

Partial Test (Prettified) Results (View the data used in the following test):


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)
simdjson 901.028 20.3129 2.59188e+06 1073 1120.6
jsonifier 693.145 15.0671 3.38056e+06 1119 1510.35 1264.2 14.1978 1.63119e+06 685 501.05

Partial Test (Minified) Results (View the data used in the following test):


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)
simdjson 691.302 21.8849 3.35443e+06 780 1060.95
jsonifier 494.807 14.2411 4.78024e+06 722 1379.65 1198.4 15.4872 1.80949e+06 678 528.55

Abc (Out of Order) Test (Prettified) Results (View the data used in the following test):


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)
simdjson 849.678 15.7866 2.97782e+06 48092 55889.7
glaze 766.943 7.64568 3.19027e+06 47627 59293.7 1443.69 2.16412 1.69118e+06 50518 33355.2
jsonifier 586.996 9.72563 4.17008e+06 49252 80165.1 1456.37 1.6636 1.67714e+06 48291 31627.9

Abc (Out of Order) Test (Minified) Results (View the data used in the following test):


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 881.745 1.10379 2.77109e+06 35342 38231.8 1304.96 3.77153 1.87492e+06 34411 25198.6
simdjson 861.516 2.06412 2.8362e+06 35403 39196.5
jsonifier 845.301 1.08959 2.88982e+06 36080 40700.4 1302.17 1.6544 1.87411e+06 33744 24704.2

Discord Test (Prettified) Results (View the data used in the following test):


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 1131.63 8.06375 2.16349e+06 92442 78037.6 1058.81 5.33366 2.32034e+06 92442 83705.6
jsonifier 927.97 3.81818 2.63439e+06 92442 95019.2 1905.25 1.6075 1.28251e+06 92442 46275.8
simdjson 698.461 4.67298 3.50176e+06 92442 126287

Discord Test (Minified) Results (View the data used in the following test):


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 1130.21 0.89293 2.16201e+06 55353 46708.6 1591.52 1.17449 1.53474e+06 55353 33169.9
glaze 996.209 12.2442 2.45565e+06 55353 53048 1861.66 1.86313 1.31205e+06 55353 28359.4
simdjson 466.945 5.833 5.23897e+06 55353 113128

Canada Test (Prettified) Results (View the data used in the following test):


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 1010.2 0.209325 2.4207e+06 6661897 6.28913e+06 1160.83 3.35286 2.11131e+06 6661897 5.4855e+06
glaze 951.551 0.322403 2.56992e+06 6661897 6.67679e+06 756.935 2.88359 3.23129e+06 6661897 8.39524e+06
simdjson 691.985 0.275577 3.5339e+06 6661897 9.18126e+06

Canada Test (Minified) Results (View the data used in the following test):


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 443.476 0.18921 5.51414e+06 2090234 4.49496e+06 515.565 1.09206 4.74305e+06 2090234 3.86652e+06
jsonifier 402.237 0.214883 6.07951e+06 2090234 4.95579e+06 447.603 0.629617 5.46316e+06 2090234 4.45354e+06
simdjson 272.21 0.184606 8.98338e+06 2090234 7.32305e+06

CitmCatalog Test (Prettified) Results (View the data used in the following test):


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 1527.81 0.549378 1.60052e+06 1439584 898614 1751.15 1.02407 1.39643e+06 1439584 784034
jsonifier 1423.37 0.526674 1.71796e+06 1439562 964542 2649.93 1.21623 922784 1439562 518134
simdjson 1034.56 0.517843 2.36364e+06 1423415 1.31215e+06

CitmCatalog Test (Minified) Results (View the data used in the following test):


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 1124 1.70927 2.17563e+06 500299 424543 1581.56 2.20638 1.54613e+06 500299 301736
jsonifier 1056.29 1.42695 2.31502e+06 500299 451741 1825.74 2.4593 1.33944e+06 500299 261382
simdjson 384.449 0.514192 6.36057e+06 492910 1.22274e+06

Twitter Partial Test (Prettified) Results (View the data used in the following test):


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)
simdjson 1644.9 1.41372 1.4847e+06 44653 25890.9
jsonifier 1599.16 1.77676 1.52727e+06 44653 26632.9 3309.14 1.95263 736856 44653 12870.8

Twitter Partial Test (Minified) Results (View the data used in the following test):


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 1608.1 1.70989 1.5184e+06 37543 22267.1 3779.73 2.63565 644355 37543 9476.45
simdjson 1405.02 1.94426 1.73819e+06 37543 25485.5

Twitter Test (Prettified) Results (View the data used in the following test):


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 1189.31 1.80949 2.05614e+06 414021 332048 1895.15 2.94305 1.29032e+06 414021 208403
simdjson 998.872 1.25085 2.448e+06 418582 399676
jsonifier 475.102 1.17973 5.14598e+06 414021 831150 2468.6 3.96567 990648 414021 160001

Twitter Test (Minified) Results (View the data used in the following test):


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 1180.09 3.42833 2.07252e+06 277014 223965 2344.73 5.74856 1.04329e+06 277014 112751
glaze 1149.3 2.72034 2.12786e+06 277014 229931 2001.6 4.95057 1.22165e+06 277014 132041
simdjson 689.086 1.44565 3.5487e+06 278407 385357

Library Write (MB/S) Write Percentage Deviation (+/-%) Write (Cycles/MB) Write Length (Bytes) Write Time (ns)
glaze 1225.65 1.44297 1.99511e+06 466906 363340
jsonifier 882.941 0.969845 2.76958e+06 466906 504345
simdjson 648.126 0.844357 3.77282e+06 466906 687051

Library Write (MB/S) Write Percentage Deviation (+/-%) Write (Cycles/MB) Write Length (Bytes) Write Time (ns)
glaze 1635.31 1.23556 1.49531e+06 699405 407911
jsonifier 1359.43 1.06125 1.79847e+06 699405 490678

Library Read (MB/S) Read Percentage Deviation (+/-%) Read (Cycles/MB) Read Length (Bytes) Read Time (ns)
glaze 2215.48 2.15842 1.10379e+06 631515 271896
jsonifier 1766.03 1.46196 1.38465e+06 631515 341072