Performance profiling of JSON libraries (Compiled and run on Ubuntu-22.04 using the Clang++18 compiler)
Latest Results: (May 15, 2024)
Single Iteration Test (Prettified) Results (View the data used in the following test):
1 iteration on a 6 core (Intel i7 8700k)
Library | Read (MB/s) | Write (MB/s) |
---|---|---|
jsonifier | 691.817 | 1566.37 |
glaze | 537.208 | 1128.06 |
simdjson | 498.989 | N/A |
Single Iteration Test (Minified) Results (View the data used in the following test):
100 iterations on a 6 core (Intel i7 8700k)
Library | Read (MB/s) | Write (MB/s) |
---|---|---|
jsonifier | 448.626 | 1149.49 |
simdjson | 444.51 | N/A |
glaze | 419.32 | 978.688 |
Multi Iteration Test (Prettified) Results (View the data used in the following test):
100 iterations on a 6 core (Intel i7 8700k)
Library | Read (MB/s) | Write (MB/s) |
---|---|---|
jsonifier | 1103.17 | 1441.7 |
glaze | 884.581 | 1093.18 |
simdjson | 167.112 | N/A |
Multi Iteration Test (Minified) Results (View the data used in the following test):
100 iterations on a 6 core (Intel i7 8700k)
Library | Read (MB/s) | Write (MB/s) |
---|---|---|
jsonifier | 772.289 | 1115.65 |
glaze | 738.214 | 944.18 |
simdjson | 543.597 | N/A |
ABC Test (Out of Sequence Performance - Prettified) (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 through hashing. 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.
100 iterations on a 6 core (Intel i7 8700k)
Library | Read (MB/s) | Write (MB/s) |
---|---|---|
jsonifier | 1043.04 | 1498.21 |
glaze | 963.909 | 1013.37 |
simdjson | 282.54 | N/A |
ABC Test (Out of Sequence Performance - Minified) (View the data used in the following test):
100 iterations on a 6 core (Intel i7 8700k)
Library | Read (MB/s) | Write (MB/s) |
---|---|---|
jsonifier | 803.891 | 1144.13 |
glaze | 765.604 | 914.049 |
simdjson | 177.341 | N/A |
Discord Test (Prettified) Results (View the data used in the following test):
100 iterations on a 6 core (Intel i7 8700k)
Library | Read (MB/s) | Write (MB/s) |
---|---|---|
jsonifier | 1467.67 | 2672.18 |
simdjson | 1429.48 | N/A |
glaze | 1376.13 | 962.722 |
Discord Test (Minified) Results (View the data used in the following test):
100 iterations on a 6 core (Intel i7 8700k)
Library | Read (MB/s) | Write (MB/s) |
---|---|---|
jsonifier | 895.77 | 2181.08 |
glaze | 732.242 | 1149.87 |
simdjson | 399.439 | N/A |
Canada Test (Prettified) Results (View the data used in the following test):
100 iterations on a 6 core (Intel i7 8700k)
Library | Read (MB/s) | Write (MB/s) |
---|---|---|
jsonifier | 2618.14 | 3282.66 |
glaze | 1791.67 | 2846.67 |
simdjson | 1244.37 | N/A |
Canada Test (Minified) Results (View the data used in the following test):
100 iterations on a 6 core (Intel i7 8700k)
Library | Read (MB/s) | Write (MB/s) |
---|---|---|
jsonifier | 685.652 | 696.247 |
glaze | 514.519 | 711.964 |
simdjson | 184.985 | N/A |
Twitter Test (Prettified) Results (View the data used in the following test):
100 iterations on a 6 core (Intel i7 8700k)
Library | Read (MB/s) | Write (MB/s) |
---|---|---|
jsonifier | 1494.87 | 3217.52 |
simdjson | 1268.3 | N/A |
glaze | 1206.29 | 2737.86 |
Twitter Test (Minified) Results (View the data used in the following test):
100 iterations on a 6 core (Intel i7 8700k)
Library | Read (MB/s) | Write (MB/s) |
---|---|---|
jsonifier | 1048.69 | 2875.05 |
glaze | 1039.5 | 1857.54 |
simdjson | 870.301 | N/A |
Minify Test Results (View the data used in the following test):
100 iterations on a 6 core (Intel i7 8700k)
Library | Read (MB/s) | Write (MB/s) |
---|---|---|
jsonifier | N/A | 755.181 |
glaze | N/A | 734.604 |
simdjson | N/A | 460.295 |
Prettify Test Results (View the data used in the following test):
100 iterations on a 6 core (Intel i7 8700k)
Library | Read (MB/s) | Write (MB/s) |
---|---|---|
jsonifier | N/A | 1783.98 |
glaze | N/A | 1351.49 |
Validation Test Results (View the data used in the following test):
100 iterations on a 6 core (Intel i7 8700k)
Library | Read (MB/s) | Write (MB/s) |
---|---|---|
jsonifier | 1529.27 | N/A |