A high-performance C++ library for parsing floating-point and integer numbers from strings, 4x to 10x faster than strtod.
fast_float is a high-performance C++ library for converting ASCII strings representing decimal numbers (like "1.3e10") into binary floating-point and integer types. It solves the problem of slow number parsing in data-intensive applications by providing an exact, locale-independent implementation that is many times faster than standard library functions.
C++ developers working on performance-critical systems such as databases, web browsers, scientific computing, and data processing pipelines where fast and accurate number parsing is essential.
Developers choose fast_float for its exceptional speed (4x-10x faster than strtod), exact IEEE-compliant rounding, and ease of integration as a header-only library. It is widely adopted in major projects like GCC, Chromium, and MySQL, ensuring reliability and performance.
Fast and exact implementation of the C++ from_chars functions for number types: 4x to 10x faster than strtod, part of GCC 12, MySQL, Chromium, Redis and WebKit/Safari
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Benchmarks in the README show parsing at up to 1 GB/s, making it 4-10 times faster than standard strtod, essential for high-throughput data processing in projects like Chromium and Apache Arrow.
Provides round-to-even behavior for precise binary representation, adhering to C++17 specifications and ensuring correctness in scientific and financial applications.
Easy to add to C++ projects without complex build systems; just include the header, and it supports CMake, FetchContent, or single-header amalgamation for flexibility.
Handles float, double, integers (with bases like 2, 10, 16), UTF-16/32 inputs, and advanced options like JSON, Fortran notation, and custom decimal separators via parse_options.
The README explicitly states it does not support long double, limiting use in applications like scientific computing that rely on extended precision floating-point types.
Only supports decimal format; hexadecimal strings are not supported, which can be a drawback for systems parsing hexadecimal numeric data common in low-level programming.
Primarily for C++ users; C programmers must use a separate port like ffc.h, adding complexity for mixed-language projects or legacy C codebases.