fast_float

Fast and exact implementation of the C++ from_chars functions for float and double types: 4x faster than strtod (by fastfloat)

Fast_float Alternatives

Similar projects and alternatives to fast_float

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a better fast_float alternative or higher similarity.

Suggest an alternative to fast_float

Reviews and mentions

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 2021-10-03.
  • Parsing can become accidentally quadratic because of sscanf
    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
    reddit.com/r/rust | 2021-07-17
    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.
    reddit.com/r/cpp | 2021-06-28
    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.
    reddit.com/r/cpp | 2021-06-28
    This library is optimised for loading and parsing big .obj files. Optimisation techniques used are: asynchronous IO, parallel parsing, and it uses fast_float to quickly parse floating point numbers.
  • First release of dragonbox, a fast float-to-string conversion algorithm, is available
    reddit.com/r/cpp | 2021-05-22
    How this compares to https://github.com/fastfloat/fast_float ?
  • Why is std::from_chars<float> slow?
    reddit.com/r/cpp | 2021-05-11
    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
    reddit.com/r/cpp | 2021-02-12
    If you don't mind a 3rd party lib until your stdlib updates, https://github.com/fastfloat/fast_float is best-in-class.
  • Eisel-Lemire Algorithm
    news.ycombinator.com | 2021-02-07
  • Ask HN: C++17/C++20 example projects with good style?
    news.ycombinator.com | 2021-02-06
    Some fun things I've figured out:

    * https://github.com/fastfloat/fast_float * from_chars() for fast integer conversion (though I benchmarked a few that were faster)

    * https://github.com/simdjson/simdjson It's hard to program normal anymore, for every little thing I ask myself "but I want it faster!" TypeScript was so much easier, other than O(n) and friends, I never cared xD

  • Fastfloat – C++ library 4x faster than strtod
    news.ycombinator.com | 2021-01-30
  • Number Parsing at a Gigabyte per Second
    news.ycombinator.com | 2021-01-30
    He touched on JSON parsers in a previous post about fast_double_parser: "People who write fast parsers tend to roll their own number parsers (e.g., RapidJSON, sajson), and so we did. However, we sacrifice some standard compliance." (The "we" in this context refers to simdjson.)

    https://lemire.me/blog/2020/03/10/fast-float-parsing-in-prac...

    He followed up in a comment: "RapidJSON has at least two fast-parsing mode. The fast mode, which I think is what you refer to, is indeed quite fast, but it can be off by one ULP, so it is not standard compliant."

    The Github README for this new project says, "The fast_float library provides a performance similar to that of the fast_double_parser library."

    https://github.com/fastfloat/fast_float

    However, the benchmarks show a significant improvement relative to those in the fast_double_parser README:

    https://github.com/lemire/fast_double_parser

    I tried to run the benchmarks, but my CMake is apparently too old, and Homebrew barfed all over the living room rug when I tried to update it.

Stats

Basic fast_float repo stats
11
730
8.6
4 days ago

fastfloat/fast_float is an open source project licensed under GNU General Public License v3.0 or later which is an OSI approved license.

Scout APM: A developer's best friend. Try free for 14-days
Scout APM uses tracing logic that ties bottlenecks to source code so you know the exact line of code causing performance issues and can get back to building a great product faster.
scoutapm.com
Find remote C++ jobs at our new job board 99remotejobs.com. There is 1 new remote job listed recently.
Are you hiring? Post a new remote job listing for free.