finds.dev

lemire/fast_double_parser

Fast function to parse strings into double (binary64) floating-point values, enforces the RFC 7159 (JSON standard) grammar: 4x faster than strtod

View on GitHub

★ 670C++Apache-2.0updated May 2025

// the take

A header-only C++ library that parses decimal strings to double-precision floats at ~660 MB/s — roughly 10x faster than strtod on real-world data. It enforces strict RFC 7159 (JSON) number grammar, so it's a drop-in for JSON parsers that need fast float parsing, not a general strtod replacement. The author explicitly recommends migrating to fast_float instead.

The performance numbers are credible and reproducible — the benchmark code is included and the methodology is published in a peer-reviewed paper. The algorithm proved itself by landing in LLVM libc++, Go's strconv, GCC 12, and WebKit, which is as good a validation as you can get. Header-only with C++11 means zero integration friction. The clusterfuzz setup shows someone actually cares about correctness under adversarial input, not just happy-path speed.

The library itself says to use fast_float instead — it's right there in the README in giant exclamation points. fast_double_parser only handles double (no float), requires null-or-delimiter termination (no begin/end pointer pair), and has no API for parsing into integral types. The fallback to platform strtod_l for mantissas longer than 19 digits means you're only getting the fast path for the common case, and the behavior on the slow path is platform-dependent.

We read the README, the directory tree and a key source file in July 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
670
Forks
59
Language
C++
License
Apache-2.0
Last commit
27 May 2025

// nearby

If fast_double_parser isn't quite it.

All repos →