论文标题
快速分析而没有后备
Fast Number Parsing Without Fallback
论文作者
论文摘要
在最近的工作中,Lemire(2021)提出了一种快速算法,将数字字符串转换为二进制浮点数。该算法已被多个重要系统采用:该算法解析了任何数字字符串,其中包含不超过19位数字的显着性字符串到IEEE浮点数中。但是,有一个检查导致后备功能以确保正确性的检查。在实践中,这种后备功能从未被调用。我们证明后备是不必要的。因此,我们可以稍微简化算法及其实现。
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.