fast_float VS serenity

Compare fast_float vs serenity 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 serenity
15 240
1,269 28,519
2.0% 2.8%
8.7 10.0
about 1 month ago 7 days ago
C++ C++
Apache License 2.0 BSD 2-clause "Simplified" License
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.

serenity

Posts with mentions or reviews of serenity. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-04-09.
  • Why does part of the Windows 98 Setup program look older than the rest?
    5 projects | news.ycombinator.com | 9 Apr 2024
    SerenityOS replicates that look and feel. It is also implemented in a dialect of C++ that adheres to some of the good parts of C++98: https://serenityos.org
  • SerenityOS
    1 project | news.ycombinator.com | 3 Apr 2024
  • XZ: A Microcosm of the interactions in Open Source projects
    7 projects | news.ycombinator.com | 30 Mar 2024
    One example of a useful technique

    https://serenityos.org/ apparently only makes source code available. There are no binary images of the OS to install

    I think Andreas said this functions like a little test -- if you're not willing to build it from source, then you probably wouldn't be a good contributor anyway.

    ---

    Likewise, my shell project provides source tarballs only, right now - https://www.oilshell.org/release/0.21.0/

    It is packaged in a number of places, which I appreciate. That means some other people are willing to do some work.

    And they provide good feedback.

    I would like it to be more widely available, but yeah I definitely see that you need to "gate" peanut gallery feedback a bit, because it takes up a lot of time.

    Of course, it's a tricky balance, because you also want feedback from casual users, to make the project better.

  • Fuzzing Ladybird with tools from Google Project Zero
    2 projects | news.ycombinator.com | 16 Mar 2024
    Indeed, given the existence of `JS::NonnullGCPtr`, `JS::GcPtr` intentionally corresponds to a nullable pointer, so it seems dangerous to convert one to a reference without a null-check.

    That said, a naive code search finds what *may* be more cases of this pattern:

    https://github.com/search?q=repo%3ASerenityOS%2Fserenity+%2F...

    Eg: https://github.com/SerenityOS/serenity/blob/a68b134e6dea5065... -> https://github.com/SerenityOS/serenity/blob/a68b134e6dea5065...

    In some of those search results, it is fine because there is a preceding null-check, and obviously I know nothing about this code other than this naive search result, but perhaps it would be prudent to vet all of them.

  • The Ladybird Browser Project
    8 projects | news.ycombinator.com | 6 Feb 2024
    It is a SerenityOS project. You can find the answer to that question in their primary project's FAQ[1].

    1. https://github.com/SerenityOS/serenity/blob/master/Documenta...

  • Sane C++ Libraries
    7 projects | news.ycombinator.com | 27 Jan 2024
    https://github.com/SerenityOS/serenity

    The best way to write proper exception free C++ is not to use the C++ Standard Library.

  • Serenum: OS from scratch to save computers [video]
    1 project | news.ycombinator.com | 16 Jan 2024
    I initially confused it with Serenity OS prior to watching the video: https://github.com/SerenityOS/serenity
  • Ask HN: What side projects landed you a job?
    62 projects | news.ycombinator.com | 3 Dec 2023
    My contributions to SerenityOS[0] helped me get my current job. My team lead (who was also my interviewer) was interested in what I did since I listed some of it in my CV, and I showed him some PRs I made and explained what went into each of them. It was really exciting because I didn't have professional experience with low-level development, and basically got the job due to hobby programming.

    [0]: https://github.com/SerenityOS/serenity/pulls?q=is%3Apr+autho...

  • SerenityOS – a love letter to '90s user interfaces with a custom Unix-like core
    1 project | news.ycombinator.com | 30 Nov 2023
  • Bring garbage collected programming languages efficiently to WebAssembly
    16 projects | news.ycombinator.com | 3 Nov 2023
    Definitely not "literally impossible", just a great deal of work. https://github.com/SerenityOS/serenity/tree/master/Ladybird

What are some alternatives?

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

dragonbox - Reference implementation of Dragonbox in C++

Chicago95 - A rendition of everyone's favorite 1995 Microsoft operating system for Linux.

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

rust-raspberrypi-OS-tutorials - :books: Learn to write an embedded OS in Rust :crab:

C++ Format - A modern formatting library

haiku - The Haiku operating system. (Pull requests will be ignored; patches may be sent to https://review.haiku-os.org).

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

linux - Linux kernel source tree

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

reactos - A free Windows-compatible Operating System

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

redox - Mirror of https://gitlab.redox-os.org/redox-os/redox