Skip to content

Latest commit

 

History

History
373 lines (272 loc) · 42 KB

Windows-MSVC.md

File metadata and controls

373 lines (272 loc) · 42 KB

Json-Performance

Performance profiling of JSON libraries (Compiled and run on Windows 10.0.20348 using the MSVC 19.42.34436.0 compiler).

Latest Results: (Feb 13, 2025)

Using the following commits:


| Jsonifier: 4f4ebad
| 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 157.929 6.42238 1.62301e+07 2199 13320 89.4957 16.3612 2.84138e+07 2194 23495
glaze 106.458 2.96753 2.35939e+07 2195 19675 81.2087 59.1571 3.572e+07 2187 29990
simdjson 84.1008 4.28635 2.94893e+07 2197 24935

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 154.796 5.09624 1.608e+07 4282 26405 170.235 6.00691 1.471e+07 4300 24140
glaze 141.146 3.36564 1.78121e+07 4222 28550 181.994 13.1511 1.37048e+07 4240 22320
simdjson 122.51 3.64322 2.0261e+07 4258 33160

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 182.224 8.02724 1.44331e+07 1049 5510 109.153 6.98713 2.38206e+07 1021 8930
glaze 69.5735 5.3624 3.6573e+07 1054 14465 58.8249 21.588 4.32603e+07 1039 17080
simdjson 48.0704 4.57876 5.15818e+07 1045 20735

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 164.469 8.43529 1.71322e+07 1037 6035 109.252 6.18683 2.37652e+07 1025 8955
glaze 66.6992 5.48839 3.83558e+07 1060 15175 60.9286 19.6937 4.16917e+07 1047 16620
simdjson 46.5284 4.28375 5.4066e+07 1044 21415

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 219.596 7.97276 1.38077e+07 451 1965 173.839 6.10583 1.78545e+07 450 2475
glaze 46.9238 3.67313 5.54118e+07 447 9090 24.4213 21.7221 1.06617e+08 448 17830
simdjson 21.6916 2.02714 1.17164e+08 450 19790

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 482.082 5.58495 5.0934e+06 47785 94525 570.594 3.55073 4.31614e+06 47252 78975
glaze 445.203 7.32019 5.5238e+06 46229 98975 452.981 5.33917 5.42164e+06 46699 98290
simdjson 307.306 8.16881 8.00523e+06 47345 147265

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 370.62 6.25135 6.64214e+06 32795 84425 478.93 3.1838 5.15327e+06 33695 67100
glaze 330.842 5.79007 7.44395e+06 33002 95180 364.217 7.4286 6.77218e+06 31098 81515
simdjson 227.045 6.99203 1.08183e+07 32913 138530

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 86.7763 30.4955 2.87974e+07 785 8235 189.852 32.7116 1.4181e+07 999 4930
simdjson 82.6032 37.6923 3.00264e+07 886 9845

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 74.0011 32.9861 3.38359e+07 679 8505 124.343 42.0936 2.23436e+07 674 5030
simdjson 54.6089 34.4287 4.53103e+07 681 11480

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 498.176 5.14734 4.93479e+06 44937 86015 529.033 6.31714 4.65049e+06 44822 80725
glaze 427.581 4.39223 5.73526e+06 46751 104250 393.125 5.20829 6.24362e+06 48504 117580
simdjson 297.955 13.2598 8.26624e+06 47376 152430

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 350.694 5.38356 7.00181e+06 31048 84295 481.89 3.41472 5.10071e+06 33325 65930
glaze 324.77 5.07044 7.56489e+06 33173 97365 357.408 5.26666 6.8777e+06 32507 86770
simdjson 198.498 3.92037 1.23807e+07 31503 151315

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 609.063 4.70955 4.02689e+06 92442 144835 710.41 2.36297 3.45761e+06 92442 124130
glaze 546.736 3.15502 4.4884e+06 92442 161340 677.937 2.15125 3.61549e+06 92442 130070
simdjson 358.397 2.15483 6.84093e+06 92442 246015

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)
glaze 439.112 3.05077 5.58749e+06 55353 120290 566.823 2.17342 4.33984e+06 55353 93160
jsonifier 410.245 5.45466 5.98552e+06 55353 128825 764.64 3.309 3.2139e+06 55353 69060
simdjson 219.441 1.73201 1.11599e+07 55353 240580

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 546.673 0.7004 4.4735e+06 6661897 1.1622e+07 1118.58 0.958239 2.18642e+06 6661897 5.68002e+06
simdjson 465.962 0.687923 5.24848e+06 6661897 1.36351e+07
glaze 449.641 0.778173 5.43891e+06 6661897 1.41301e+07 722.639 1.09046 3.38426e+06 6661897 8.79216e+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 202.414 0.918319 1.20822e+07 2090234 9.84851e+06 469.065 1.1851 5.2142e+06 2090234 4.25001e+06
glaze 169.814 0.910412 1.44015e+07 2090234 1.17391e+07 346.145 0.997761 7.06563e+06 2090234 5.75936e+06
simdjson 151.351 0.810625 1.61582e+07 2090234 1.31711e+07

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 898.565 2.45951 2.72239e+06 1439584 1.52803e+06 722.47 1.10962 3.3855e+06 1439584 1.90037e+06
jsonifier 882.926 2.00951 2.77055e+06 1439562 1.55507e+06 1528.2 1.19205 1.60093e+06 1439562 898455
simdjson 511.377 4.3269 4.78715e+06 1423415 2.65707e+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 447.566 6.61069 5.4702e+06 500299 1.06694e+06 365.744 3.06684 6.68916e+06 500299 1.30484e+06
jsonifier 409.408 4.201 5.97856e+06 500299 1.16614e+06 841.948 1.92301 2.90638e+06 500299 566760
simdjson 203.724 1.37582 1.2006e+07 492910 2.30754e+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)
jsonifier 756.304 7.08593 3.25636e+06 44653 56395 799.044 2.39155 3.09265e+06 44653 53310
simdjson 574.271 6.60721 4.29315e+06 44653 74265

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 669.406 5.50185 3.68197e+06 37543 53530 665.337 2.33578 3.70266e+06 37543 53835
simdjson 509.78 4.31369 4.82719e+06 37543 70290

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 694.071 2.88887 3.52566e+06 414021 569080 785.306 4.30413 3.11794e+06 414021 503070
glaze 548.204 2.15397 4.46364e+06 414021 720345 419.372 1.52649 5.83414e+06 414021 941620
simdjson 446.584 2.13756 5.47927e+06 418582 894085

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 546.737 5.88308 4.47987e+06 277014 483760 693.504 2.77273 3.52986e+06 277014 381075
glaze 446.755 2.72525 5.47807e+06 277014 591500 401.36 1.2579 6.0961e+06 277014 658265
simdjson 315.515 2.96232 7.75572e+06 278407 841715

Library Write (MB/S) Write Percentage Deviation (+/-%) Write (Cycles/MB) Write Length (Bytes) Write Time (ns)
jsonifier 579.353 1.0461 4.22289e+06 466906 768595
glaze 503.265 2.38583 4.86233e+06 466906 885025
simdjson 274.966 0.736494 8.89504e+06 466906 1.61942e+06

Library Write (MB/S) Write Percentage Deviation (+/-%) Write (Cycles/MB) Write Length (Bytes) Write Time (ns)
glaze 845.96 1.02205 2.89209e+06 699405 788470
jsonifier 805.4 0.616203 3.03794e+06 699405 828180

Library Read (MB/S) Read Percentage Deviation (+/-%) Read (Cycles/MB) Read Length (Bytes) Read Time (ns)
glaze 2038.07 0.214429 1.20138e+06 646997 302750
jsonifier 1634.53 0.450069 1.4976e+06 646997 377495