Fast Number Parsing Without Fallback
Noble Mushtak, Daniel Lemire

TL;DR
This paper proves that a fallback check in a fast number parsing algorithm is unnecessary, allowing for a simplified implementation that maintains correctness and efficiency in converting number strings to floating-point numbers.
Contribution
The paper demonstrates that the fallback in Lemire's fast number parsing algorithm is redundant, enabling a more streamlined and efficient implementation.
Findings
The fallback check is never triggered in practice.
Simplified algorithm maintains correctness without fallback.
Implementation improvements lead to faster number parsing.
Abstract
In recent work, Lemire (2021) presented a fast algorithm to convert number strings into binary floating-point numbers. The algorithm has been adopted by several important systems: e.g., it is part of the runtime libraries of GCC 12, Rust 1.55, and Go 1.16. The algorithm parses any number string with a significand containing no more than 19 digits into an IEEE floating-point number. However, there is a check leading to a fallback function to ensure correctness. This fallback function is never called in practice. We prove that the fallback is unnecessary. Thus we can slightly simplify the algorithm and its implementation.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsComputational Physics and Python Applications · Numerical Methods and Algorithms
