Issue 133630
Summary Investigate faster floating point parsing
Labels enhancement, clang:frontend, floating-point
Assignees
Reporter cor3ntin
    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](https://arxiv.org/abs/2101.11408).

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


_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to