fast_float VS cppfront

Compare fast_float vs cppfront and see what are their differences.

fast_float

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

cppfront

A personal experimental C++ Syntax 2 -> Syntax 1 compiler (by hsutter)
JetBrains - Tell us how you use coding tools. You may win a prize!
Are you a developer or a data analyst? Share your thoughts about your coding tools in our short survey and get a chance to win prizes!
surveys.jetbrains.com
featured
InfluxDB – Built for High-Performance Time Series Workloads
InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.
www.influxdata.com
featured
fast_float cppfront
15 92
1,861 5,797
2.9% 0.5%
8.2 8.5
7 days ago 3 days ago
C++ C++
Apache License 2.0 GNU General Public License v3.0 or later
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

fast_float

Posts with mentions or reviews of fast_float. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-04-03.
  • Parquet: More than just “Turbo CSV”
    7 projects | news.ycombinator.com | 3 Apr 2023
    > Google put in significant engineering effort into "Ryu", a parsing library for double-precision floating point numbers: https://github.com/ulfjack/ryu

    It's not a parsing library, but a printing one, i.e., double -> string. https://github.com/fastfloat/fast_float is a parsing library, i.e., string -> double, not by Google though, but was indeed motivated by parsing JSON fast https://lemire.me/blog/2020/03/10/fast-float-parsing-in-prac...

  • What do number conversions (from string) cost?
    1 project | /r/cpp | 20 Mar 2023
    For those that don't know, gcc 12.x updated its float parsing logic to something similar to fast_float and it's about 1/6 of the cost presented here (sub 100 in the graph presented here). Strongly suggest using that library or upgrading the compiler if you need the performance.
  • Can sanitizers find the two bugs I wrote in C++?
    11 projects | news.ycombinator.com | 8 Feb 2023
    This makes sense for integers but betware floating point from_chars - libc++ still doesn't implement it and libstdc++ implements it by wrapping locale-dependent libc functions which involves temporarily changing the thread locale and possibly memory allocation to make the passed string 0-terminated. IMO libstdc++'s checkbox "solution" is worse than not implementing it at all - user's are better off using Lemire's API-compatible fast_float implementation [0].

    [0] https://github.com/fastfloat/fast_float

  • Passing Programs To A Stack Machine
    1 project | /r/cpp_questions | 11 Nov 2021
    I'm a bit stuck on how to do the same thing in c++, due to containers only having a single type. The very inefficient way I'm currently doing it is by passing a program as a vector of strings, and then converting the string constants to doubles with the fast_float library.
  • Parsing can become accidentally quadratic because of sscanf
    2 projects | /r/programming | 3 Oct 2021
    Just above this comment is a merged PR, which references fast_float library: https://github.com/fastfloat/fast_float
  • Making Rust Float Parsing Fast: libcore Edition
    10 projects | /r/rust | 17 Jul 2021
    Daniel Lemire @lemire (creator of the algorithm, author of the C++ implementation, and provided constant feedback to help guide the PR).
  • RapidObj v0.1 - A fast, header-only, C++17 library for parsing Wavefront .obj files.
    4 projects | /r/cpp | 28 Jun 2021
    And out of 6,000 lines in the file, at least 3000 are other people's code: earcut for polygon triangulation and fast_float because .obj files typically contain a lot of floating point numbers so it's important to parse them quickly.
  • First release of dragonbox, a fast float-to-string conversion algorithm, is available
    3 projects | /r/cpp | 22 May 2021
    How this compares to https://github.com/fastfloat/fast_float ?
  • Why is std::from_chars<float> slow?
    1 project | /r/cpp | 11 May 2021
    I tried to compare it against Daniel Lemire's excellent fast_float library. Fast float took about 180ms for the same program, and all I did was change "std" namespace prefix to "fast_float". It's a factor of 12 difference, at least my machine. I tried MSVC next, and it is a lot better, but it is still ~4 times slower than fast float. AFAIK, clang currently does not implement the feature at all.
  • Iterator invalidation of std::string_view
    1 project | /r/cpp | 12 Feb 2021
    If you don't mind a 3rd party lib until your stdlib updates, https://github.com/fastfloat/fast_float is best-in-class.

cppfront

Posts with mentions or reviews of cppfront. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2025-04-15.
  • Make C++ a better place #2: CppFront as an alternative
    2 projects | dev.to | 15 Apr 2025
    In this article, we will explore how CppFront aims to make C++ a better place by introducing a new syntax, improving safety and usability and providing modern features that align with good programming practices - all while maintaining full interoperability with C++.
  • 21st Century C++
    3 projects | news.ycombinator.com | 5 Feb 2025
    > And I'm left wondering, is this just how C++ is? Can't the language provide tooling for me to better adhere to its guidelines

    Well, first, the language can't provide tooling: C++ is defined formally, not through tools; and tools are not part of the standard. This is unlike, say, Rust, where IIANM - so far, Rust has been what the Rust compiler accepts.

    But it's not just that. C++ design principles/goals include:

    * multi-paradigmatism;

    * good backwards compatibility;

    * "don't pay for what you don't use"

    and all of these in combination prevent baking in almost anything: It will either break existing code; or force you to program a certain way, while legitimate alternatives exist; or have some overhead, which you may not want to pay necessarily.

    And yet - there are attempts to "square the circle". An example is Herb Sutter's initiative, cppfront, whose approach is to take in an arguably nicer/better/easier/safer syntax, and transpile it into C++ :

    https://github.com/hsutter/cppfront/

  • Herb Sutter's Cppfront 0.8.0
    1 project | news.ycombinator.com | 3 Nov 2024
  • Cppfront v0.8.0
    1 project | news.ycombinator.com | 2 Nov 2024
  • Trip C++Now 2024 – think-cell
    4 projects | news.ycombinator.com | 10 May 2024
    I’m not fond of adding an increasing number of specific compiler options for memory-safety. I love -faddress=sanitizer or -fsanitize. But the historically growing number of warning which need to be turned on is an issue. For example the options -Wconversion, -Wsign-conversion and -Warith-conversion shall be default with C++26. And if your code doesn’t compile use either an older revision or turn it deliberately off (saying: I’m aware, read the handbook, I take the risk).

    I want some of not all the ideas of CPP2/cppfront[1] in C++XX. Finally using #unsafe when needed, like Rust. C++ does evolve over decades, more like other languages.

    [1] https://github.com/hsutter/cppfront

  • GCC 14.1 Release
    2 projects | news.ycombinator.com | 7 May 2024
    CPP2/cppfront:

    https://github.com/hsutter/cppfront

    I hope we see this in C++26 as optional mode i.e. #safe and #unsafe and same for #impdef or so.

  • Compilation of gripping C++ conference talks from 2023
    2 projects | dev.to | 2 May 2024
    C++23 is done. But C++ is not! In this talk, the author shares his personal perspectives on an ongoing and very active evolution of C++, updates on his cppfront experimental compiler, and why compatibility is essential to the further success of the C++ development.
  • Show HN: a Rust Based CLI tool 'imgcatr' for displaying images
    12 projects | news.ycombinator.com | 16 Apr 2024
  • Cpp2 and cppfront – An experimental 'C++ syntax 2' and its first compiler
    7 projects | news.ycombinator.com | 31 Mar 2024
  • C++ Safety, in Context
    8 projects | news.ycombinator.com | 12 Mar 2024
    https://github.com/hsutter/cppfront

    But his side project at Microsoft didn't gain traction with gcc, clang, etc and everybody else in the industry. So at this point, the C++ committee will be perceived as "so far behind" ... because there's nothing for them to vote on.

What are some alternatives?

When comparing fast_float and cppfront you can also consider the following projects:

rapidobj - A fast, header-only, C++17 library for parsing Wavefront .obj files.

carbon-lang - Carbon Language's main repository: documents, design, implementation, and related tools. (NOTE: Carbon Language is experimental; see README)

dragonbox - Reference implementation of Dragonbox in C++

jakt - The Jakt Programming Language

fast-float-rust - Super-fast float parser in Rust (now part of Rust core)

modern-cpp-features - A cheatsheet of modern C++ language and library features.

JetBrains - Tell us how you use coding tools. You may win a prize!
Are you a developer or a data analyst? Share your thoughts about your coding tools in our short survey and get a chance to win prizes!
surveys.jetbrains.com
featured
InfluxDB – Built for High-Performance Time Series Workloads
InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.
www.influxdata.com
featured

Did you know that C++ is
the 7th most popular programming language
based on number of references?