Skip to content

Files

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-1021-azure using the GNU 12.3.0 compiler).

Latest Results: (Feb 13, 2025)

Using the following commits:


| Jsonifier: b4d1bbb
| Glaze: 7e525e8
| Simdjson: 078e2c9

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 288.167 6.78572 8.73115e+06 2195 7283.4 266.657 6.8845 9.45792e+06 2195 7870.15
glaze 171.915 3.96449 1.45399e+07 2188 12156.1 149.345 5.42727 1.65496e+07 2199 14064.7
simdjson 123.746 5.45084 1.99662e+07 2199 16978

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 545.528 3.84361 4.61366e+06 4196 7339.6 657.353 3.41864 3.93198e+06 4290 6227.8
glaze 268.549 4.31493 9.18712e+06 4276 15200.8 525.487 4.24284 4.72874e+06 4284 7779.9
simdjson 191.565 9.65205 1.28891e+07 4315 21545.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 371.066 5.90514 7.03059e+06 1052 2708.5 250.855 4.42936 1.00424e+07 1034 3935.45
glaze 182.397 8.69611 1.39863e+07 1040 5449.15 171.838 6.03614 1.46086e+07 1043 5795.3
simdjson 122.871 5.10902 2.03483e+07 1027 7977.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)
jsonifier 286.768 6.66556 8.92564e+06 1033 3442.35 252.265 3.10109 1.01005e+07 1061 4012.4
simdjson 121.821 4.94772 2.05458e+07 1041 8158.7
glaze 75.2065 5.85146 3.30648e+07 1051 13343.5 172.8 5.30229 1.45014e+07 1036 5720.1

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 262.298 7.30968 1.03647e+07 447 1631.55 315.714 6.78185 8.50578e+06 447 1354.9
glaze 95.0695 5.01352 2.6703e+07 449 4515.85 89.644 3.71748 2.88053e+07 447 4767.5
simdjson 63.7698 2.83571 3.94163e+07 449 6721.5

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 784.433 4.30329 3.12589e+06 48529 58979.2 963.127 3.02068 2.54437e+06 46129 45649.6
simdjson 764.628 2.81047 3.20517e+06 45467 56684.3
glaze 702.885 2.20626 3.48641e+06 47608 64590.3 1072.49 3.02831 2.28943e+06 48112 42756.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)
glaze 640.974 0.949922 3.82669e+06 32984 49068 1088.97 3.19672 2.26413e+06 32938 28885.3
jsonifier 601.172 4.18854 4.08494e+06 33064 52470.8 753.054 3.87481 3.26562e+06 32715 41418.9
simdjson 504.297 2.95796 4.8603e+06 33291 62966.4

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 257.368 36.2293 1.0033e+07 835 2946.95 456.945 30.9146 5.76956e+06 1076 2205.2
simdjson 248.321 30.4248 1.03917e+07 979 3652.95

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 202.119 34.1676 1.29101e+07 593 2732.65 362.348 25.5905 7.3401e+06 731 1880.85
simdjson 193.632 31.3961 1.33847e+07 769 3724.45

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 811.417 5.14063 3.02494e+06 47514 55799.6 1004.48 2.52104 2.44895e+06 47214 44790.6
glaze 685.719 3.77119 3.5679e+06 48661 67558.4 1156.86 3.98945 2.1229e+06 48848 40255.6
simdjson 547.254 9.74098 4.54339e+06 46679 82556.5

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 726.615 2.53614 3.37525e+06 34141 44764.5 1011.39 2.4015 2.43438e+06 32163 30318.8
glaze 633.652 1.66437 3.87567e+06 31894 47996.9 1061.16 3.18543 2.31883e+06 32377 29096.7
simdjson 569.094 1.67579 4.31238e+06 32122 53803.4

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 1284.87 2.91227 1.90824e+06 92442 68634.9 1804.66 2.59601 1.36062e+06 92442 48859.7
simdjson 1048.25 1.42679 2.33928e+06 92442 84108.4
glaze 842.572 1.31621 2.9091e+06 92442 104638 1351.11 1.45598 1.81818e+06 92442 65254.9

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 923.183 2.31946 2.65541e+06 55353 57191.2 1540.45 1.3999 1.59166e+06 55353 34271.8
simdjson 670.023 1.3554 3.6562e+06 55353 78792.5
glaze 642.731 0.955145 3.81203e+06 55353 82134.6 1793.82 2.67526 1.37104e+06 55353 29436

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 1015.72 0.256374 2.40766e+06 6661897 6.25496e+06 768.872 1.33922 3.18126e+06 6661897 8.26477e+06
simdjson 830.739 0.309795 2.94376e+06 6661897 7.64778e+06
jsonifier 815.318 4.74234 3.00321e+06 6661897 7.80209e+06 1254.33 2.65128 1.95317e+06 6661897 5.07399e+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 461.548 0.273642 5.29859e+06 2090234 4.31895e+06 531.14 0.739894 4.60445e+06 2090234 3.75313e+06
jsonifier 423.079 0.271794 5.78031e+06 2090234 4.71167e+06 505.137 0.715465 4.84144e+06 2090234 3.94631e+06
simdjson 326.533 2.00555 7.49166e+06 2090234 6.10663e+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 1637.53 0.558959 1.49373e+06 1439562 838405 2512.28 0.968546 973736 1439562 546489
glaze 1424.99 0.465057 1.71652e+06 1439584 963457 1765.45 0.574388 1.38554e+06 1439584 777664
simdjson 1194.74 0.498917 2.04723e+06 1423415 1.13623e+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 997.749 1.43584 2.45211e+06 500299 478246 1821.7 1.8574 1.34325e+06 500299 261944
glaze 977.148 1.29024 2.50385e+06 500299 488320 1720.41 2.13074 1.42294e+06 500299 277414
simdjson 457.938 0.555183 5.34107e+06 492910 1.02652e+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 1646.23 3.29774 1.49775e+06 44653 25879.8
jsonifier 1525.44 2.57135 1.61678e+06 44653 27929.5 2901.87 2.35025 854013 44653 14680.4

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 1506.89 2.20611 1.635e+06 37543 23767.2 3759.38 3.19306 660639 37543 9528.7
simdjson 1485.98 2.9511 1.65682e+06 37543 24099.8

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)
jsonifier 1320.22 0.792537 1.85321e+06 414021 299080 2483.4 2.66468 986655 414021 159019
simdjson 1237.13 0.561072 1.97834e+06 418582 322683
glaze 1025.46 0.807829 2.38651e+06 414021 385046 1762.88 1.13333 1.3887e+06 414021 223990

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 1210.49 2.79055 2.02344e+06 277014 218348 2422.78 1.6564 1.01097e+06 277014 109046
simdjson 851.486 1.72762 2.87425e+06 278407 311867
glaze 845.518 1.77747 2.89477e+06 277014 312509 2116.87 1.7392 1.15703e+06 277014 124811

Library Write (MB/S) Write Percentage Deviation (+/-%) Write (Cycles/MB) Write Length (Bytes) Write Time (ns)
glaze 1104.77 1.3807 2.2148e+06 466906 403102
jsonifier 976.847 0.989973 2.50504e+06 466906 455853
simdjson 582.171 0.670196 4.20165e+06 466906 764872

Library Write (MB/S) Write Percentage Deviation (+/-%) Write (Cycles/MB) Write Length (Bytes) Write Time (ns)
glaze 1681.72 1.60076 1.45507e+06 699405 396676
jsonifier 1361.21 0.98865 1.79724e+06 699405 490038

Library Read (MB/S) Read Percentage Deviation (+/-%) Read (Cycles/MB) Read Length (Bytes) Read Time (ns)
glaze 2250.89 1.6912 1.08723e+06 631515 267585
jsonifier 1817.61 1.7442 1.34648e+06 631515 331392