Files
json/tests/benchmarks/json_view/others/rust/Cargo.toml
T
Niels Lohmann 7341f127d3 docs: compare json_document with Glaze, sonic, RapidJSON and Rust parsers
Extends the comparison in "How 3.13.0 got faster" from yyjson, simdjson and
Boost.JSON to eleven engines: sonic-cpp, RapidJSON and Glaze (generic DOM,
lazy_json, reading into structs) in C++, sonic-rs, simd-json and serde_json in
Rust. Measured on an Apple M1 Max (Apple clang 21, Rust 1.99) and an x86-64
Haswell server (GCC 13, Clang 18). Every engine must return the same values,
string bytes and bit-identical number sums before it is timed.

The post now answers whether json_document is the fastest parser: it is the
fastest document parser at parse+dump everywhere and at parsing on Apple
silicon, ties with simdjson's DOM on x86-64, and loses to simdjson On-Demand
and Glaze structs when only a few fields are read.

tests/benchmarks/json_view/others holds the programs (bench_all.cpp, the Rust
crate with its Cargo.lock), summarize.py and the pinned versions and checksums.

Signed-off-by: Niels Lohmann <mail@nlohmann.me>
2026-10-30 15:29:46 +01:00

15 lines
236 B
TOML

[package]
name = "bench_rs"
version = "0.1.0"
edition = "2021"
[dependencies]
simd-json = "*"
sonic-rs = "*"
serde_json = { version = "*", features = ["float_roundtrip"] }
[profile.release]
opt-level = 3
lto = "fat"
codegen-units = 1