jeaiii/itoa: Fast integer to ascii / integer to string conversion ·
Disclaimer: This is not a good way to benchmark. It's not very repeatable and google benchmark is compiled in debug, although fmt being mostly header is optimized and inlined well. The performance charts below are much more accurate. The last column is uniform random length numbers from 1 to N digits - worst case for branch prediction based on number of digits Fast integer to ascii / integer to string conversion
newest version: jeaiii_to_text.h 0 dependency header only - as in absolutely no dependencies on ANY other headers fast - fasted tested on vs2019 in x86 and x64 for all digit lengths, uniform random bits, and uniform random digit lengths (latest version is even 25% faster than before) using https://github.com/jeaiii/itoa-benchmark small - simple code that produces good compiled code even in debug builds (no nested functions) compiles on clang, msvc, and gcc as C++11 or later written to specialize well based on integer type (size, signed, unsigned) and possible values determined at…
saved by
related reading
- abseil / Performance Hintsabseil.io
- Algorithms for Modern Hardware - Algorithmicaen.algorithmica.org
- Spatialspatial-lang.org
- abseil / Performance Hintsabseil.io
- Numbers Every Programmer Should Know By Yearcolin-scott.github.io
- JIT Compiling Code in 5μsmalisper.me
- There are Only Four Billion Floats-So Test Them All! | Random ASCII – tech blog of Bruce Dawsonrandomascii.wordpress.com
- Rust Optimization.md · GitHubgist.github.com
- Competitive Programmer's Handbookcses.fi
- Hōrōshi バガボンド (@KatanaLarp) on Xx.com
- LeetCode-Solutions/0001-1000.md at master · Holychung/LeetCode-Solutionsgithub.com
- Fabrice Bellard's Home Pagebellard.org