fast_float VS cppreference-doc

Compare fast_float vs cppreference-doc 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 and WebKit/Safari (by fastfloat)
Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
fast_float cppreference-doc
15 56
1,277 398
2.7% -
8.7 0.0
about 1 month ago about 1 year ago
C++ HTML
Apache License 2.0 GNU General Public License v3.0 only
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.

cppreference-doc

Posts with mentions or reviews of cppreference-doc. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-03-16.
  • Looking for well written, modern C++ (17/20) example projects for microcontrollers
    19 projects | /r/embedded | 16 Mar 2023
    Rather than looking at good examples (which you should by all means do), add cppreference.com to you bookmarks and use it as your reference. By far the best C++ reference on the net. (from a C programmer who was thrown into C++ a decade ago -- slowly digesting C++20 now) Both StackOverflow.com and electronic.stackexchange.com are two additional QA sites that can help.
  • My first C++ project! A "mostly sane" C++ coroutine helper library
    2 projects | /r/cpp | 23 Feb 2023
    Sadly, not much. My method of learning is to get my hands dirty and waste a lot of time doing things wrong before I do them right. The only resource (outside of Google and StackOverflow) that I always had open was https://en.cppreference.com
  • C++ switch problem
    1 project | /r/learnprogramming | 10 Feb 2023
    In general, https://en.cppreference.com is your friend.
  • Can sanitizers find the two bugs I wrote in C++?
    11 projects | news.ycombinator.com | 8 Feb 2023
    > As a C++ language reference I highly recommend https://en.cppreference.com

    I'd be careful about such re-formulations of the Standard. When I was adding printf format checking to the D compiler, I discovered there were subtle discrepancies in the description of exactly how printf behaves. I went back to using the Standard.

  • Ask HN: What are great resources to catch up C++?
    4 projects | news.ycombinator.com | 16 Jan 2023
    Modern C++ code now looks very different to even C++11 code which is considered to be the start of modern C++.

    "A Tour of C++" which has already been recommended is probably a good start to get back in the game. I think there was a new version coming out, but not sure what the current status about this is.

    [https://en.cppreference.com](cppreference.com) is a good resource for me. It has documentation regarding the new standards as well and up to C++20 the examples are mostly complete, at least for the relevant things.

    I can also recommend watching the "Back to Basics" talks on the CppCon youtube channel and once you are more familiar also the regular talks. They are great resources about practical topics.

    Jason Turner's C++ Weekly videos are also a great resource. They are usually 10-15 minutes long videos that give you a good start to think about. Great way to learn something new every week.

  • Why did rust Settle on snake_case?
    1 project | /r/learnrust | 8 Jan 2023
    At Google, at least, the style guide says to use snake case for variable names in C++ (but camel case for classes). As far as I can tell, this is also the convention in the C++ standard library.
  • wget keeps downloading forever, and stuff I don't want
    1 project | /r/linuxquestions | 27 Dec 2022
    Lets say that there's a file at https://en.cppreference.com/ called preferences.c. The command to download it would be wget https://en.cppreference.com/preferences.c
  • I am stuck in tutorial hell
    2 projects | /r/cpp | 21 Dec 2022
    I would start with a direction of where to apply C++. Updating legacy code, working on embedded systems, creating financial application and creating high performant games are a few common option. Also sites like cppreference and Compiler Explorer/Godbolt are your friends in learning. CPlusPlus.com might help with legacy support as it stops with C++11.
  • C++ #include errors detected
    2 projects | /r/CodingHelp | 12 Dec 2022
    Keep in mind that most YouTube C++ tutorials are garbage. Use www.learncpp.com instead as a tutorial, and https://en.cppreference.com as a language reference. Once you familiarize yourself with the language, you can learn the best practices using the C++ Core Guidelines.
  • I'm struggling
    2 projects | /r/cpp_questions | 12 Dec 2022
    The important thing to remember is that a concept exist and roughly what it's called, so you can look it up when you need to. You don't need to keep all the details in your head, that's what we have en.cppreference.com for.

What are some alternatives?

When comparing fast_float and cppreference-doc you can also consider the following projects:

dragonbox - Reference implementation of Dragonbox in C++

telescope-vimwiki.nvim - look through your vimwiki with your telescope

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

browser-compat-data - This repository contains compatibility data for Web technologies as displayed on MDN

C++ Format - A modern formatting library

cling - The cling C++ interpreter

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

magic_get - std::tuple like methods for user defined types without any macro or boilerplate code

RapidJSON - A fast JSON parser/generator for C++ with both SAX/DOM style API

cgi-lib - A FREE ANSI C library for CGI programming.

simdutf8 - SIMD-accelerated UTF-8 validation for Rust.

cppinsights - C++ Insights - See your source code with the eyes of a compiler