Every ctoon language binding (C, C++, Python, Go, Rust, Zig, MATLAB, Octave) benchmarked head-to-head against every maintained competing TOON implementation that exists for that language.
Two separate numbers, because they answer different questions. Success is the share of corpus files a library converted without an error. Correct is, of the outputs it actually produced, the share that were right, so “98% success, 0% correct” reads as what it is: a library that never complains and never gets it right. Correct means: TOON that a library produced is decoded with the official reference decoder (@toon-format/toon), not with the library's own, because a lenient decoder hides encoder bugs from its own round trip; and JSON that a library produced is parsed back. Either way the result has to equal the original document. Equality is the spec's JSON-model equality: numbers compare as IEEE-754 doubles (the spec lets an encoder fall back to the host's numeric approximation), objects are unordered maps, arrays are ordered.
MB/s and docs/s count only correct conversions, so a wrong answer never looks like a fast one; the time is the time of all attempts, as before. TOON → JSON decodes the TOON that ctoon produced for each file; if that shared input is itself missing or wrong, the file is left out of every library's TOON → JSON row (the encoder is charged for it under JSON → TOON), so no decoder is blamed for someone else's output.
Every "Key order preservation" table below round-trips this exact JSON through that library and checks whether the keys come back in this same order. The sample is deliberately non-alphabetical, with a nested object and an array of objects, so sorting or hash-based reordering would show up.
{"zebra": 1, "apple": 2, "mango": 3, "nested": {"beta": true, "alpha": false}, "list": [{"z": 1, "a": 2}, {"z": 3, "a": 4}]}
Throughput vs. input size: one line per library, marker per size bucket.
Throughput vs. input size: one line per library, marker per size bucket.
Throughput vs. input size: one line per library, marker per size bucket.
Throughput vs. input size: one line per library, marker per size bucket.
Throughput vs. input size: one line per library, marker per size bucket.
| Operation | Library | MB/s | docs/s | Success | Correct | Total time (s) |
|---|---|---|---|---|---|---|
| JSON → TOON | ctoon | 302.65 | 46253.9 | 100% | 100% | 0.198 |
| TOON → JSON | ctoon | 164.31 | 41264.1 | 100% | 100% | 0.222 |
| TOON → JSON | TOONc | 0 | 0 | 98.5% | 0% | 0.607 |
| JSON → TOON → JSON | ctoon | 145.31 | 22207.3 | 100% | 100% | 0.412 |
| TOON → struct (load) | ctoon | 289.7 | 72755.6 | 100% | 100% | 0.126 |
| struct → TOON (dump) | ctoon | 703.04 | 107443.5 | 100% | 100% | 0.085 |
Round-trips the fixed sample above through each library and checks whether keys come back in the same order they went in.
| Library | Order preserved | Detail |
|---|---|---|
| ctoon | ✓ yes | n/a |
| TOONc | ✓ yes | n/a |
| Operation | Library | MB/s | docs/s | Success | Correct | Total time (s) |
|---|---|---|---|---|---|---|
| JSON → TOON | ctoon | 310.03 | 47380.3 | 100% | 100% | 0.193 |
| TOON → JSON | ctoon | 182.69 | 45881.9 | 100% | 100% | 0.199 |
| JSON → TOON → JSON | ctoon | 149.75 | 22885.9 | 100% | 100% | 0.399 |
| TOON → struct (load) | ctoon | 282.2 | 70873.0 | 100% | 100% | 0.129 |
| struct → TOON (dump) | ctoon | 649.52 | 99264.8 | 100% | 100% | 0.092 |
Round-trips the fixed sample above through each library and checks whether keys come back in the same order they went in.
| Library | Order preserved | Detail |
|---|---|---|
| ctoon | ✓ yes | n/a |
| Operation | Library | MB/s | docs/s | Success | Correct | Total time (s) |
|---|---|---|---|---|---|---|
| JSON → TOON | ctoon | 242.42 | 37048.2 | 100% | 100% | 0.247 |
| JSON → TOON | gotoon | 16.57 | 2947.3 | 100% | 81.4% | 2.524 |
| JSON → TOON | toon-go | 30.98 | 4735.3 | 100% | 100% | 1.93 |
| TOON → JSON | ctoon | 128.63 | 32304.8 | 100% | 100% | 0.283 |
| TOON → JSON | toon-go | 36.42 | 9145.6 | 100% | 100% | 0.999 |
| JSON → TOON → JSON | ctoon | 117.21 | 17912.8 | 100% | 100% | 0.51 |
| JSON → TOON → JSON | toon-go | 21.39 | 3268.7 | 100% | 100% | 2.796 |
| TOON → struct (load) | ctoon | 72.25 | 18145.2 | 100% | 100% | 0.504 |
| TOON → struct (load) | toon-go | 54.28 | 13631.8 | 100% | 100% | 0.67 |
| struct → TOON (dump) | ctoon | 145.79 | 22280.2 | 100% | 100% | 0.41 |
| struct → TOON (dump) | gotoon | 24.45 | 4348.8 | 100% | 81.4% | 1.711 |
| struct → TOON (dump) | toon-go | 54.3 | 8299.1 | 100% | 100% | 1.101 |
| Operation | Library | MB/s | docs/s | Success | Correct | Total time (s) |
|---|---|---|---|---|---|---|
| JSON → TOON | ctoon | 247.82 | 37873.1 | 100% | 100% | 0.241 |
| TOON → JSON | ctoon | 158.62 | 39835.8 | 100% | 100% | 0.229 |
| JSON → TOON → JSON | ctoon | 133.12 | 20344.5 | 100% | 100% | 0.449 |
| TOON → struct (load) | ctoon | 75.97 | 19079.0 | 100% | 100% | 0.479 |
| struct → TOON (dump) | ctoon | 70.38 | 10756.6 | 100% | 100% | 0.85 |
| Operation | Library | MB/s | docs/s | Success | Correct | Total time (s) |
|---|---|---|---|---|---|---|
| JSON → TOON | @toon-format/toon | 33.93 | 5185.5 | 100% | 100% | 1.763 |
| TOON → JSON | @toon-format/toon | 9.38 | 2355.2 | 100% | 100% | 3.881 |
| JSON → TOON → JSON | @toon-format/toon | 9.17 | 1401.7 | 100% | 100% | 6.521 |
| TOON → struct (load) | @toon-format/toon | 10.1 | 2537.0 | 100% | 100% | 3.603 |
| struct → TOON (dump) | @toon-format/toon | 37.3 | 5700.7 | 100% | 100% | 1.603 |
| Operation | Library | MB/s | docs/s | Success | Correct | Total time (s) |
|---|---|---|---|---|---|---|
| JSON → TOON | ctoon | 99.6 | 15221.2 | 100% | 100% | 0.6 |
| TOON → JSON | ctoon | 65.6 | 16473.9 | 100% | 100% | 0.555 |
| JSON → TOON → JSON | ctoon | 66.67 | 10188.4 | 100% | 100% | 0.897 |
| TOON → struct (load) | ctoon | 10.16 | 2551.2 | 100% | 100% | 3.583 |
| struct → TOON (dump) | ctoon | 23.83 | 3642.5 | 100% | 100% | 2.509 |
| Operation | Library | MB/s | docs/s | Success | Correct | Total time (s) |
|---|---|---|---|---|---|---|
| JSON → TOON | ctoon | 280.99 | 42942.8 | 100% | 100% | 0.213 |
| JSON → TOON | toon_format | 17.78 | 2717.3 | 100% | 100% | 3.364 |
| JSON → TOON | toons | 101.86 | 15567.1 | 100% | 100% | 0.587 |
| TOON → JSON | ctoon | 149.86 | 37636.6 | 100% | 100% | 0.243 |
| TOON → JSON | toon_format | 7.7 | 1934.1 | 100% | 100% | 4.726 |
| TOON → JSON | toons | 43.82 | 11005.1 | 100% | 100% | 0.831 |
| JSON → TOON → JSON | ctoon | 118.33 | 18083.4 | 100% | 100% | 0.505 |
| JSON → TOON → JSON | toon_format | 7.24 | 1106.8 | 100% | 100% | 8.258 |
| JSON → TOON → JSON | toons | 33.39 | 5102.3 | 100% | 100% | 1.791 |
| TOON → struct (load) | ctoon | 123.92 | 31121.4 | 100% | 100% | 0.294 |
| TOON → struct (load) | toon_format | 8.55 | 2147.8 | 100% | 100% | 4.256 |
| TOON → struct (load) | toons | 84.56 | 21236.3 | 100% | 100% | 0.43 |
| struct → TOON (dump) | ctoon | 321.32 | 49106.8 | 100% | 100% | 0.186 |
| struct → TOON (dump) | toon_format | 19.82 | 3028.9 | 100% | 100% | 3.018 |
| struct → TOON (dump) | toons | 202.15 | 30894.3 | 100% | 100% | 0.296 |
| Operation | Library | MB/s | docs/s | Success | Correct | Total time (s) |
|---|---|---|---|---|---|---|
| JSON → TOON | ctoon | 267.68 | 40908.9 | 100% | 100% | 0.223 |
| JSON → TOON | toon-rust | 39.13 | 6178.7 | 100% | 87.7% | 1.298 |
| TOON → JSON | ctoon | 122.7 | 30814.7 | 100% | 100% | 0.297 |
| TOON → JSON | toon-rust | 14.62 | 9021.4 | 36.3% | 94.0% | 0.346 |
| JSON → TOON → JSON | ctoon | 137.8 | 21059.6 | 100% | 100% | 0.434 |
| JSON → TOON → JSON | toon-rust | 22.09 | 3361.7 | 95.6% | 93.1% | 2.421 |
| TOON → struct (load) | ctoon | 109.1 | 27399.8 | 100% | 100% | 0.334 |
| TOON → struct (load) | toon-rust | 15.2 | 9379.7 | 36.3% | 94.0% | 0.333 |
| struct → TOON (dump) | ctoon | 294.21 | 44964.0 | 100% | 100% | 0.203 |
| struct → TOON (dump) | toon-rust | 48.13 | 7599.6 | 100% | 87.7% | 1.055 |
| Operation | Library | MB/s | docs/s | Success | Correct | Total time (s) |
|---|---|---|---|---|---|---|
| JSON → TOON | ctoon | 317.7 | 48552.6 | 100% | 100% | 0.188 |
| TOON → JSON | ctoon | 169.64 | 42604.7 | 100% | 100% | 0.215 |
| JSON → TOON → JSON | ctoon | 139.65 | 21342.5 | 100% | 100% | 0.428 |
| TOON → struct (load) | ctoon | 144.89 | 36388.6 | 100% | 100% | 0.251 |
| struct → TOON (dump) | ctoon | 309.47 | 47295.4 | 100% | 100% | 0.193 |
Recorded automatically by system_info.py at run
time, not filled in by hand. Numbers above are only meaningful relative
to each other on this specific machine; they won't transfer directly to yours.
| CPU | Intel(R) Xeon(R) Processor @ 2.10GHz |
| Logical cores | 2 |
| RAM | 7.8 GiB |
| Architecture | x86_64 |
| OS | Linux 6.18.44-fc-v139 |
| Python | CPython 3.13.16 |