Demonstrates improved speed for integer to decimal conversion, highlighting significant performance gains.
Objective Converting binary integers to variable‐length decimal strings is a fundamental operation in computing. Conventional fast approaches rely on recursive division and small lookup tables. The goal of this work is to develop a significantly faster method for this task. Methods We propose a SIMD‐based algorithm that leverages integer multiply‐add instructions available on recent AMD and Intel processors. Our method eliminates lookup tables entirely and computes multiple quotients and remainders in parallel. Additionally, we introduce a dual‐variant design with dynamic selection that adapts to input characteristics: a branch‐heavy variant optimized for homogeneous digit‐length distributions and a branch‐light variant for heterogeneous datasets. Results Our single‐core algorithm consistently outperforms all competing methods across the full range of integer sizes. It runs 1.4–2× faster than the closest competitor and 2–4× faster than the C++ standard library function ‘ std::to_chars ’ across tested workloads. Conclusion The proposed SIMD‐based approach with dual‐variant dynamic selection provides a substantial performance improvement for integer‐to‐decimal conversion, delivering superior speed without relying on traditional lookup tables.
No takes yet. Share an insight, caveat, or question.
Gareau et al. (2026) studied this question.
Synapse has enriched 5 closely related papers on similar clinical questions. Consider them for comparative context: