Background
src/decode/number.rs uses <f64>::from_str (via the standard library) to parse floating-point numbers. The standard library implementation is correct but not optimized for throughput; the lexical crate offers a significantly faster parser with the same correctness guarantees.
Proposal
Profile from_str against lexical::parse::<f64> on a representative mixed-payload bench (many numeric fields). If from_str is measurable in the profile, replace it with lexical-core (no-std compatible, no allocation).
Acceptance criteria
- Benchmark shows
lexical is faster in the target workload (many float fields).
cargo test --no-default-features still passes (lexical is scalar-safe).
- No change to the external API or error semantics —
QJD_PARSE_ERROR still returned on malformed numbers.
Notes
lexical-core is a popular, well-maintained crate used by serde_json and simd-json. Adding it is low-risk. If profiling shows from_str is not on the hot path for typical "parse + read 3 fields" workloads, close this as not worth the dependency.
Background
src/decode/number.rsuses<f64>::from_str(via the standard library) to parse floating-point numbers. The standard library implementation is correct but not optimized for throughput; thelexicalcrate offers a significantly faster parser with the same correctness guarantees.Proposal
Profile
from_stragainstlexical::parse::<f64>on a representative mixed-payload bench (many numeric fields). Iffrom_stris measurable in the profile, replace it withlexical-core(no-std compatible, no allocation).Acceptance criteria
lexicalis faster in the target workload (many float fields).cargo test --no-default-featuresstill passes (lexical is scalar-safe).QJD_PARSE_ERRORstill returned on malformed numbers.Notes
lexical-coreis a popular, well-maintained crate used byserde_jsonandsimd-json. Adding it is low-risk. If profiling showsfrom_stris not on the hot path for typical "parse + read 3 fields" workloads, close this as not worth the dependency.