Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. C/C++
  3. fast_float

fast_float

Apache-2.0C++v8.2.10

A high-performance C++ library for parsing floating-point and integer numbers from strings, 4x to 10x faster than strtod.

Visit WebsiteGitHubGitHub
2.1k stars193 forks0 contributors

What is fast_float?

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.

Target Audience

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.

Value Proposition

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.

Overview

Fast and exact implementation of the C++ from_chars functions for number types: 4x to 10x faster than strtod, part of GCC 12, MySQL, DuckDB, Chromium, Redis and WebKit/Safari

Use Cases

Best For

  • Parsing large volumes of numeric data in databases or data pipelines
  • Improving number parsing performance in web browsers and JavaScript engines
  • High-speed logging and monitoring systems that process numeric metrics
  • Scientific computing applications requiring exact floating-point conversion
  • Embedded systems where memory allocation and performance are constrained
  • Implementing JSON parsers or other data serialization formats efficiently

Not Ideal For

  • Systems requiring hexadecimal floating-point number parsing
  • Applications dependent on long double precision for extended accuracy
  • Projects needing full locale-aware parsing with complex cultural formatting rules beyond custom decimal separators

Pros & Cons

Pros

Exceptional Parsing Speed

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.

Exact IEEE Rounding

Provides round-to-even behavior for precise binary representation, adhering to C++17 specifications and ensuring correctness in scientific and financial applications.

Header-Only Integration

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.

Broad Type and Format Support

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.

Cons

No Long Double Support

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.

Decimal-Only Parsing

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.

C++-Exclusive Implementation

Primarily for C++ users; C programmers must use a separate port like ffc.h, adding complexity for mixed-language projects or legacy C codebases.

Frequently Asked Questions

Quick Stats

Stars2,094
Forks193
Contributors0
Open Issues18
Last commit15 days ago
CreatedSince 2020

Tags

#cpp-library#high-performance#simd#cpp17#visual-studio#c-plus-plus#ieee-754#floating-point#linux#high-throughput#data-processing#neon#macos#freebsd#cpp11#header-only#performance

Built With

C
C++

Links & Resources

Website

Included in

C/C++70.6k
Auto-fetched 6 hours ago

Related Projects

stbstb

stb single-file public domain libraries for C/C++

Stars34,612
Forks8,088
Last commit1 month ago
{fmt}{fmt}

A modern formatting library

Stars25,655
Forks3,045
Last commit10 hours ago
xxHashxxHash

Extremely fast non-cryptographic hash algorithm

Stars11,242
Forks914
Last commit1 month ago
single_file_libssingle_file_libs

List of single-file C/C++ libraries, with emphasis on clause-less licenses.

Stars9,997
Forks650
Last commit20 days ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub