Here's a few benchmarks on a few common operating system/compiler platforms. Although feel free to try it out on more and let me know if you do/what scores you get! Cheers! (Click each of the badges below to be taken to the respective benchmarks). Also I will add some instructions for building below.
- void-numerics
- jeaiii_itoa
- fmt
- std Library
Full build instructions — including the PGO/LTO pipeline used to produce every result on this page — live in Compilation Method.
- CMake 3.28 or later.
- A C++20 compliant compiler.
- Python3 and Seaborn for generating the graphs.
Two separate things are doing work here. Timing methodology — adaptive epoch sampling, Welch's t-test for statistical tie detection, Bessel-corrected variance — comes from the CPU benchmark library benchmarksuite. Making sure the binaries being timed are a fair fight is this repo's own job: every library under test, including the standard library, is built through the same three-stage PGO/LTO pipeline (instrumented GENERATE build → training run → profile-consuming USE build) before it's ever measured, so no library gets a hand-optimized build going up against everyone else's defaults.
"Anytime someone comes to you with one benchmark? They have gamed that benchmark." — Matt Kulukundis, CppCon 2017: "Designing a Fast, Efficient, Cache-friendly Hash Table, Step by Step"