Open
Description
I was looking at some benchmarks and found out that we can spend a lot of time in
IEEEFloat::convertFromDecimalString
(for the case of large arrays of floating points in source code)
Looking at that code, it seems that for at least some combination of rounding modes, semantics
and size, we could benefit from Lemire's algorithm.
We already ship that algorithm in libc, so hopefully we could reuse that.
https://github.com/llvm/llvm-project/blob/main/libc/src/__support/str_to_float.h
Assuming most floating-point literals are well-formed/short (do not represent a number that doesn't fit in a double), it would almost certainly be a great improvement to try Lemire first and fallback on the existing implementation for long doubles, etc