Open and answer this issue on GitHub.
ready, json · opened 2026-11-21 · updated 2026-11-22 · 0 comments
Part of #1019 After #2496
A benchmark that shows what a typed read through a grammar entry (ADR-grammar-2, now ADR-grammar-typed-read-v1) costs against serde_json. This is step 5 of #1019, placed after the string views (step 3e, #2496) in the original build order. It is counted with callgrind, never timed (docs/measuring.md).
benches/json/, modelled on benches/brc/:
Vec of a struct with String, i64, f64, bool, a T? and a nested list;serde_json::from_slice with derive, both release builds with opt-level = 3 and the same LTO setting, the same output byte for byte;json::parse plus a conversion by hand.benches/json/ holds the Nikaia typed read, the serde_json derive reader and the json::parse plus conversion row, all printing the same output byte for byte, with a callgrind table (instructions, mispredicted branches) per row; that commit says Fixes #N.
benches/json/ (new), modelled on benches/brc/.
Split from #1019 by Claude Code