LEPTRIS

Benchmarks · YAML

yeptris, the YAML engine

yeptris is the YAML counterpart of libleptris: a YAML 1.2 parser, emitter and streamer in C11 with hard memory bounds. The benchmark matrix runs both engines over the same corpora in the same process, across ten document shapes and three consumption models — DOM construction, pull parsing and event recording — in addition to emission. Every corpus is generated deterministically with a fixed seed, and the harness can dump each corpus so that any number on this page reproduces byte for byte.

YAML — competitorC / C++RubyPythonJavaScriptRust
libyaml0.62×–21.53×————
ryml1.76×+————

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

Versus libyaml

libyaml is the reference implementation underlying Ruby’s Psych and a large share of YAML tooling. The comparison below is the committed release gate: every shape and consumption model must stay ahead of the same-run libyaml measurement, and the weakest cell is the headline of each release.

operationleptris sidelibyaml 0.2.5standing
Parse DOM — block-heavy302.96 MB/s39.78 MB/s7.62×
Parse pull — block-heavy57.48 MB/s39.78 MB/s1.44×
Parse recorder — block-heavy41.34 MB/s39.78 MB/s1.04×
Emit — block-heavy463.89 MB/s39.78 MB/s11.66×
Parse DOM — scalar-heavy807.51 MB/s69.86 MB/s11.56×
Parse pull — scalar-heavy215.33 MB/s69.86 MB/s3.08×
Parse recorder — scalar-heavy75.21 MB/s69.86 MB/s1.08×
Emit — scalar-heavy976.55 MB/s69.86 MB/s13.98×
Parse DOM — anchor-heavy90.71 MB/s38.63 MB/s2.35×
Parse pull — anchor-heavy61.85 MB/s38.63 MB/s1.60×
Parse recorder — anchor-heavy43.33 MB/s38.63 MB/s1.12×
Emit — anchor-heavy278.46 MB/s38.63 MB/s7.21×
Parse DOM — deep-nesting796.05 MB/s102.22 MB/s7.79×
Parse pull — deep-nesting184.61 MB/s102.22 MB/s1.81×
Parse recorder — deep-nesting96 MB/s102.22 MB/s0.94×

the deep-nesting recorder lane rides the general engine route (the fused walk serves the DOM lane); the sub-parity recorder read is tracked in benchmarks/PERF-LEDGER.md.

Emit — deep-nesting475.93 MB/s102.22 MB/s4.66×
Parse DOM — wide-mapping446.45 MB/s47.35 MB/s9.43×
Parse pull — wide-mapping89.36 MB/s47.35 MB/s1.89×
Parse recorder — wide-mapping54.33 MB/s47.35 MB/s1.15×
Emit — wide-mapping1019.51 MB/s47.35 MB/s21.53×
Parse DOM — realworld suite19.99 MB/s32.14 MB/s0.62×

the realworld-suite corpus parses in 0.3-0.7 ms; on shared runners the fixed per-parse floor dominates and the sub-millisecond reads swing with the runner class — the ledger's cross-commit law applies (compare CI artifacts on the same runner class, not across weeks). DOM/pull/recorder deficits are tracked in benchmarks/PERF-LEDGER.md, not smoothed.

Parse pull — realworld suite25.94 MB/s32.14 MB/s0.81×

the realworld-suite corpus parses in 0.3-0.7 ms; on shared runners the fixed per-parse floor dominates and the sub-millisecond reads swing with the runner class — the ledger's cross-commit law applies (compare CI artifacts on the same runner class, not across weeks). DOM/pull/recorder deficits are tracked in benchmarks/PERF-LEDGER.md, not smoothed.

Parse recorder — realworld suite29.22 MB/s32.14 MB/s0.91×

the realworld-suite corpus parses in 0.3-0.7 ms; on shared runners the fixed per-parse floor dominates and the sub-millisecond reads swing with the runner class — the ledger's cross-commit law applies (compare CI artifacts on the same runner class, not across weeks). DOM/pull/recorder deficits are tracked in benchmarks/PERF-LEDGER.md, not smoothed.

Emit — realworld suite236.97 MB/s32.14 MB/s7.37×

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

rapidyaml is a C++ YAML parser with a substantially different internal design, and the comparison against it is run as an interleaved head-to-head with a fair ordering referee, reporting the median of rounds. The numbers on this page come from the Linux CI runner (the 2026-11-09 round), where the AVX2 kernels dispatch: all five YAML shapes are ahead — block-heavy 5.95×, wide-mapping 4.97×, deep-nesting 2.98×, scalar-heavy 2.59×, anchor-heavy 1.76× (the shape the ledger once named the open target — its residual lived in the shared per-line lanes, not the anchor table, and the per-line memo that fused those lanes has since closed it: the matched A/B h2h reads 1.34×, the last DOM cell past rapidyaml). The ARM macOS leg reads 1.5–4.0× on the same shapes — anchor-heavy included — and every cell is tracked with the same discipline. Every optimization attempt on these rows is recorded in the ledger with before-and-after numbers, including the attempts that measured flat and were reverted.

operationleptris sideryml 0.16.0standing
Head-to-head DOM — block-heavy302.23 MB/sryml 0.16.0 (f8ac8dd)5.95×
Head-to-head DOM — scalar-heavy805.35 MB/sryml 0.16.0 (f8ac8dd)2.59×
Head-to-head DOM — anchor-heavy90.76 MB/sryml 0.16.0 (f8ac8dd)1.76×
Head-to-head DOM — deep-nesting772.49 MB/sryml 0.16.0 (f8ac8dd)2.98×
Head-to-head DOM — wide-mapping444.61 MB/sryml 0.16.0 (f8ac8dd)4.97×

The recorded residual is leg-specific: the NEON macOS runner reads closer to parity on several shapes than the AVX2 leg above, and that difference is tracked rather than smoothed over — the campaign logs treat an unexplained ISA gap as a defect. The two deficits the referee currently reports — the sub-millisecond realworld-suite shapes (where the fixed per-parse floor dominates on shared runners) and the deep-nesting recorder lane — are carried with notes in the table above and tracked in the ledger. The discipline file for this work is theyeptris performance ledger. The JSON-shaped corpora in the same matrix are presented on theJSON page.

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.

YAML

Measured deficits

Every YAML operation in the result data that remains behind its competitor, ordered from the weakest ratio. The current campaign carries the realworld-suite trio — a sub-millisecond corpus whose shared-runner reads swing with the runner class (the ledger’s cross-commit law applies) — and the deep-nesting recorder lane; both stay tracked in the ledger rather than smoothed over here.

operationleptris sideversusstanding
Parse DOM — realworld suite19.99 MB/s32.14 MB/s0.62×

the realworld-suite corpus parses in 0.3-0.7 ms; on shared runners the fixed per-parse floor dominates and the sub-millisecond reads swing with the runner class — the ledger's cross-commit law applies (compare CI artifacts on the same runner class, not across weeks). DOM/pull/recorder deficits are tracked in benchmarks/PERF-LEDGER.md, not smoothed.

Parse pull — realworld suite25.94 MB/s32.14 MB/s0.81×

the realworld-suite corpus parses in 0.3-0.7 ms; on shared runners the fixed per-parse floor dominates and the sub-millisecond reads swing with the runner class — the ledger's cross-commit law applies (compare CI artifacts on the same runner class, not across weeks). DOM/pull/recorder deficits are tracked in benchmarks/PERF-LEDGER.md, not smoothed.

Parse recorder — realworld suite29.22 MB/s32.14 MB/s0.91×

the realworld-suite corpus parses in 0.3-0.7 ms; on shared runners the fixed per-parse floor dominates and the sub-millisecond reads swing with the runner class — the ledger's cross-commit law applies (compare CI artifacts on the same runner class, not across weeks). DOM/pull/recorder deficits are tracked in benchmarks/PERF-LEDGER.md, not smoothed.

Parse recorder — deep-nesting96 MB/s102.22 MB/s0.94×

the deep-nesting recorder lane rides the general engine route (the fused walk serves the DOM lane); the sub-parity recorder read is tracked in benchmarks/PERF-LEDGER.md.