Benchmarks · JSON
JSON, through yeptris
yeptris parses JSON as what it is — a strict subset of YAML 1.2 — through a dedicated fused walk that validates the RFC 8259 grammar and builds the document in a single pass. Conformance is gated by the JSONTestSuite corpus under the YAML 1.2 schema, where yeptris accepts all 95 valid inputs and rejects all 188 invalid inputs. The measurements below race the JSON-shaped corpora through the committed benchmark matrix against the YAML incumbents and against simdjson, the reference JSON parser, in the same run. Three consumption routes are measured against simdjson: DOM construction, which builds a navigable document; the strict tape route introduced in yeptris 0.2.2, which validates into compact parallel columns with no document model; and the lenient tape, which defers number typing to the consumer — the bulk-drain lane the bindings ride. The simdjson comparison is stated with both numbers and is the honest centerpiece of this page.
| JSON — competitor | C / C++ | Ruby | Python | JavaScript | Rust |
|---|---|---|---|---|---|
| libyaml | 1.25×+ | — | — | — | — |
| ryml | 3.45×+ | — | — | — | — |
| simdjson | 0.68×–1.13× | — | — | — | — |
A green cell with a single value means every measured operation in that race is ahead, and the value shown is the smallest margin. A neutral cell shows the range from the weakest to the strongest operation; hovering lists the operations that remain behind. All rows, including deficits, appear in the tables below.
C
yeptris versus the YAML incumbents
The matrix generates four JSON-shaped corpora: a multi-document flow corpus, a single-document flow corpus, one large flat document, and a record-heavy users corpus. Each is measured through DOM construction, pull parsing and event recording, in addition to emission, in the same run against the same-build reference libraries.
| operation | leptris side | libyaml 0.2.5 | standing |
|---|---|---|---|
| Parse DOM — flow-json | 182.77 MB/s | 31.36 MB/s | 5.83× |
| Parse pull — flow-json | 49.98 MB/s | 31.36 MB/s | 1.59× |
| Parse recorder — flow-json | 39.23 MB/s | 31.36 MB/s | 1.25× |
| Emit — flow-json | 159.54 MB/s | 31.36 MB/s | 5.09× |
| Parse DOM — flow-single | 351.03 MB/s | 33.22 MB/s | 10.57× |
| Parse pull — flow-single | 77.9 MB/s | 33.22 MB/s | 2.34× |
| Parse recorder — flow-single | 55.29 MB/s | 33.22 MB/s | 1.66× |
| Emit — flow-single | 161.28 MB/s | 33.22 MB/s | 4.85× |
| Parse DOM — json-doc | 285.62 MB/s | 29.51 MB/s | 9.68× |
| Parse pull — json-doc | 53.08 MB/s | 29.51 MB/s | 1.80× |
| Parse recorder — json-doc | 40.71 MB/s | 29.51 MB/s | 1.38× |
| Emit — json-doc | 325.28 MB/s | 29.51 MB/s | 11.02× |
| Parse DOM — json-users | 282.62 MB/s | 31.92 MB/s | 8.85× |
| Parse pull — json-users | 65.16 MB/s | 31.92 MB/s | 2.04× |
| Parse recorder — json-users | 43.32 MB/s | 31.92 MB/s | 1.36× |
| Emit — json-users | 197.41 MB/s | 31.92 MB/s | 6.18× |
fresh runyeptris 0.6.60 (main 6fed677)·min-of-iters; h2h rows: interleaved, median of rounds·GitHub Actions ubuntu-latest, x86_64 (AVX2)··bench_matrix — same corpus both engines, same run; h2h rows: interleaved head-to-head, median of rounds; simdjson parses a pre-built padded string (calibrated, #420)
Versus rapidyaml on the same corpora
| operation | leptris side | ryml 0.16.0 | standing |
|---|---|---|---|
| Head-to-head DOM — flow-json | 183 MB/s | ryml 0.16.0 (f8ac8dd) | 5.39× |
| Head-to-head DOM — flow-single | 351.08 MB/s | ryml 0.16.0 (f8ac8dd) | 3.45× |
| Head-to-head DOM — json-doc | 281.91 MB/s | ryml 0.16.0 (f8ac8dd) | 8.54× |
| Head-to-head DOM — json-users | 277 MB/s | ryml 0.16.0 (f8ac8dd) | 5.34× |
The head-to-head against rapidyaml is run interleaved with a fair-order referee and reports the median of rounds. The yeptris performance ledger records the engine-dispatch work behind these rows, together with every measured dead end, in theyeptris ledger.
Versus simdjson, the JSON-native reference
| operation | leptris side | simdjson 3.13.0 | standing |
|---|---|---|---|
| Head-to-head parse — json-doc via DOM construction | 801.22 MB/s | simdjson 3.13.0 (3839ac6) | 1.04× simdjson parses a pre-built padded string into its DOM; the raw-pointer overload's realloc_if_needed input copy is NOT in its timed loop (the harness was calibrated to match, #420). yeptris parse_json builds the full node tree. |
| Head-to-head parse — json-doc via the packed record tape | 868.36 MB/s | simdjson 3.13.0 (3839ac6) | 1.13× |
| Head-to-head parse — json-doc via the lenient tape (deferred number grammar) | 780.66 MB/s | simdjson 3.13.0 (3839ac6) | 1.02× the lenient route defers number typing (the consumer settles kinds), so its contract is cheaper than RFC 8259 validation; the row is the bulk-drain ceiling, the strict rows above are the honest strict reads. |
| Head-to-head parse — json-users via DOM construction | 651.96 MB/s | simdjson 3.13.0 (3839ac6) | 0.70× simdjson parses a pre-built padded string into its DOM; the raw-pointer overload's realloc_if_needed input copy is NOT in its timed loop (the harness was calibrated to match, #420). yeptris parse_json builds the full node tree. |
| Head-to-head parse — json-users via the packed record tape | 656.43 MB/s | simdjson 3.13.0 (3839ac6) | 0.71× |
| Head-to-head parse — json-users via the lenient tape (deferred number grammar) | 632.43 MB/s | simdjson 3.13.0 (3839ac6) | 0.68× the lenient route defers number typing (the consumer settles kinds), so its contract is cheaper than RFC 8259 validation; the row is the bulk-drain ceiling, the strict rows above are the honest strict reads. |
simdjson validates JSON into a linear tape with SIMD structural indexing and no document model — a fundamentally cheaper contract than anything that also serves YAML. The referee is calibrated to simdjson’s own harness idiom: it parses a pre-built padded string, so no input-copy tax sits in its timed loop (the calibration itself is ledger history — an earlier version of this table flattered us). Calibrated, the 2026-11-09 round reads the flat document shape over simdjson parity — DOM 1.04×, strict tape 1.13× — while the record-heavy shape reads 0.70× DOM / 0.71× strict tape: single-document simplicity is won, the users corpus’s longer strings are the residual. The lenient tape rows (deferred number typing — a cheaper contract than RFC 8259, the bulk-drain ceiling the bindings ride) read 1.02× and 0.68×. The residual is per-ISA codegen — the arm64 macOS leg reads the same routes 0.67–0.95× (the dev M1 Max lenient lane 0.78× after the 2026-11-08 whole-pass cuts) — and the named levers are the NEON arm codegen question and the codegen shape arms, not another walk-level arm (three dispatch-level attacks measured dead). The walk is recorded slice by slice in the ledger.
To reproduce: configure yeptris with-DYEPTRIS_BUILD_BENCHMARKS=ON -DYEPTRIS_BENCH_LIBYAML_ROOT=…(and -DYEPTRIS_BENCH_RYML_ROOT=… for the head-to-head), then run bench_matrix --full. The harness is committed atbenchmarks.
JSON
Measured deficits
Every JSON operation in the result data that remains behind its competitor, ordered from the weakest ratio. This section is generated from the same result files as the tables above.
| operation | leptris side | versus | standing |
|---|---|---|---|
| Head-to-head parse — json-users via the lenient tape (deferred number grammar) | 632.43 MB/s | simdjson 3.13.0 (3839ac6) | 0.68× the lenient route defers number typing (the consumer settles kinds), so its contract is cheaper than RFC 8259 validation; the row is the bulk-drain ceiling, the strict rows above are the honest strict reads. |
| Head-to-head parse — json-users via DOM construction | 651.96 MB/s | simdjson 3.13.0 (3839ac6) | 0.70× simdjson parses a pre-built padded string into its DOM; the raw-pointer overload's realloc_if_needed input copy is NOT in its timed loop (the harness was calibrated to match, #420). yeptris parse_json builds the full node tree. |
| Head-to-head parse — json-users via the packed record tape | 656.43 MB/s | simdjson 3.13.0 (3839ac6) | 0.71× |