Skip to content

Latest commit

 

History

History
373 lines (272 loc) · 42.2 KB

Ubuntu-GNUCXX.md

File metadata and controls

373 lines (272 loc) · 42.2 KB

Json-Performance

Performance profiling of JSON libraries (Compiled and run on Linux 6.8.0-1020-azure using the GNU 12.3.0 compiler).

Latest Results: (Feb 01, 2025)

Using the following commits:


| Jsonifier: 27e0345
| Glaze: 48d8ed5
| Simdjson: dbea3bb

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 368.642 4.59625 6.9731e+06 2191 5674.25 334.242 6.67427 7.71463e+06 2196 6276.6
glaze 273.411 4.36584 9.10213e+06 2196 7668.75 243.845 3.18022 1.01795e+07 2195 8589.65
simdjson 106.678 6.10942 2.30813e+07 2195 19648.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 544.54 3.80369 4.58319e+06 4297 7531.7 717.244 4.71412 3.47303e+06 4284 5702.6
glaze 267.135 3.54573 9.21881e+06 4267 15238.1 500.655 3.58636 5.00971e+06 4245 8091.2
simdjson 189.401 7.40722 1.29855e+07 4270 21546.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 315.835 6.83598 8.2061e+06 1027 3105.35 240.21 6.99174 1.06756e+07 1058 4209.05
glaze 179.578 10.8625 1.3913e+07 1008 5373.05 160.268 5.53006 1.58129e+07 1031 6142.45
simdjson 127.777 3.94277 1.958e+07 1061 7926.35

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 285.228 6.25646 9.11886e+06 1049 3511.55 227.094 6.37231 1.12491e+07 1027 4319.25
glaze 165.037 20.9367 1.51868e+07 1029 5990.15 161.857 5.14327 1.56436e+07 1046 6167.95
simdjson 124.325 5.28754 2.01384e+07 1056 8112

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 297.58 5.50843 9.17434e+06 449 1443.1 270.791 6.04254 9.92792e+06 450 1587.05
glaze 93.128 5.93572 2.68833e+07 450 4621.35 88.4531 4.02375 2.90139e+07 446 4823
simdjson 64.8219 2.09573 3.85119e+07 449 6617.25

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)
jsonifier 855.343 1.4756 2.86919e+06 48650 54240.5 1209.53 1.71358 2.03242e+06 47185 37192.1
simdjson 795.714 2.34888 3.07791e+06 46933 56223.7
glaze 616.706 4.69625 3.97074e+06 47723 73792.4 1221.49 2.95803 2.00713e+06 47882 37364.3

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)
jsonifier 701.782 2.12374 3.49669e+06 33100 44946.9 1021.57 2.65892 2.40945e+06 33005 30812.6
glaze 640.921 1.50991 3.8289e+06 32189 47884.6 1080.86 2.56013 2.27933e+06 32742 28910.2
simdjson 571.565 1.70079 4.29397e+06 32141 53639.8

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)
jsonifier 290.511 33.4132 9.11729e+06 1113 3597.25 457.104 37.0456 6.08807e+06 887 1789.95
simdjson 278.309 31.7923 9.03358e+06 1070 3555.1

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 256.723 29.5092 9.87278e+06 736 2655.1 467.827 33.8995 5.79138e+06 641 1267.3
simdjson 208.018 31.5904 1.20276e+07 652 2860.7

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)
jsonifier 728.683 2.73234 3.3658e+06 48089 62874.2 1094.56 2.9675 2.23907e+06 47609 41477.1
glaze 539.032 5.57179 4.54589e+06 47006 83222.2 1050.31 4.41084 2.33157e+06 45691 41451.1
simdjson 513.75 9.88232 4.82128e+06 48243 90593.4

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)
jsonifier 637.711 2.32822 3.84389e+06 32947 49221.6 983.77 2.44312 2.50003e+06 33127 32100.7
glaze 632.65 1.20377 3.88249e+06 32674 49242.8 1063.53 3.44757 2.31742e+06 33400 29978.7
simdjson 558.455 1.89488 4.39252e+06 33340 56899.8

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)
jsonifier 1182.76 1.41998 2.07369e+06 94378 76104.4 1080.87 1.33484 2.26873e+06 94378 83280.4
simdjson 1093.58 1.25973 2.24123e+06 105406 91928.9
glaze 863.872 0.693963 2.83636e+06 94378 104192 767.289 1.65935 3.1933e+06 94378 117320

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 876.2 1.70617 2.8e+06 56377 61368.8 1542.03 1.91435 1.59494e+06 56377 34872.2
simdjson 669.771 1.31977 3.66183e+06 61629 87756.6
glaze 648.882 0.716074 3.77696e+06 56377 82860.9 937.753 2.40989 2.61656e+06 56377 57345.7

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)
glaze 979.343 0.208141 2.49708e+06 6661897 6.4873e+06 1089.84 0.573346 2.24397e+06 6661897 5.82963e+06
jsonifier 868.188 1.87743 2.81732e+06 6661897 7.31924e+06 1178.4 3.05235 2.08026e+06 6661897 5.40427e+06
simdjson 816.496 0.283201 2.99508e+06 6661897 7.78118e+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)
jsonifier 478.312 0.225647 5.11282e+06 2090234 4.16758e+06 472.913 0.672368 5.17128e+06 2090234 4.21519e+06
glaze 457.133 0.150535 5.34973e+06 2090234 4.36067e+06 453.926 1.53054 5.39365e+06 2090234 4.39649e+06
simdjson 328.411 0.336553 7.44654e+06 2090234 6.06988e+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)
jsonifier 1664.04 0.706096 1.47027e+06 1439562 825039 2506.15 0.978451 976047 1439562 547827
glaze 1508.6 0.525512 1.62137e+06 1439584 910056 1779.07 0.66959 1.37484e+06 1439584 771710
simdjson 1191.31 0.541314 2.05317e+06 1423415 1.13949e+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)
jsonifier 1006.75 1.4345 2.43035e+06 500299 473976 1777.23 2.15016 1.37676e+06 500299 268509
glaze 982.083 1.05538 2.49131e+06 500299 485859 1676.84 1.65021 1.45919e+06 500299 284582
simdjson 453.991 0.421779 5.38758e+06 492910 1.03544e+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 1680.38 2.60159 1.46706e+06 44653 25349
jsonifier 1548.98 2.62508 1.58946e+06 44653 27499.5 3084.74 2.83059 803735 44653 13808.5

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)
simdjson 1452.59 2.10011 1.69665e+06 37543 24652.8
jsonifier 1394.69 2.93982 1.76621e+06 37543 25680.5 3254.85 2.91988 764314 37543 11007.1

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)
simdjson 1261.88 1.07069 1.93883e+06 723784 547052
jsonifier 1260.84 1.29164 1.94062e+06 719139 543993 2283.39 2.12812 1.07156e+06 719139 300398
glaze 1079.13 0.796437 2.26828e+06 719139 635570 1635.05 1.21827 1.49623e+06 719139 419479

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 1131.11 1.49836 2.1634e+06 477706 402834 2137.01 2.40544 1.14503e+06 477706 213222
simdjson 886.324 1.1978 2.76082e+06 479183 515635
glaze 874.345 1.09653 2.79812e+06 477706 521094 2343.69 3.01908 1.04429e+06 477706 194428

Library Write (MB/S) Write Percentage Deviation (+/-%) Write (Cycles/MB) Write Length (Bytes) Write Time (ns)
glaze 1188.9 1.2761 2.0581e+06 466906 374579
jsonifier 987.51 1.18448 2.47751e+06 466906 450945
simdjson 590.242 0.547516 4.1442e+06 466906 754419

Library Write (MB/S) Write Percentage Deviation (+/-%) Write (Cycles/MB) Write Length (Bytes) Write Time (ns)
glaze 1686.77 1.55537 1.45069e+06 699405 395473
jsonifier 1354.4 0.950994 1.80635e+06 699405 492503

Library Read (MB/S) Read Percentage Deviation (+/-%) Read (Cycles/MB) Read Length (Bytes) Read Time (ns)
glaze 2259.74 1.98633 1.08323e+06 631515 266555
jsonifier 1788.38 1.07021 1.36845e+06 631515 336795