[libc-commits] [llvm] [libc] [libc] Move printf long double to simple calc (PR #75414)
Guillaume Chatelet via libc-commits
libc-commits at lists.llvm.org
Thu Jan 11 08:24:29 PST 2024
================
@@ -87,14 +87,25 @@ are not recommended to be adjusted except by persons familiar with the Printf
Ryu Algorithm. Additionally they have no effect when float conversions are
disabled.
+LIBC_COPT_FLOAT_TO_STR_NO_SPECIALIZE_LD
+---------------------------------------
+This flag disables the separate long double conversion implementation. It is
+not based on the Ryu algorithm, instead generating the digits by
+multiplying/dividing the written-out number by 10^9 to get blocks. It's
+significantly faster than INT_CALC, only about 10x slower than MEGA_TABLE,
----------------
gchatelet wrote:
Thx for the long explanation. I really appreciate it.
> In conclusion, I believe the table is already compressed within an order of magnitude of its minimum size, and that makes it too large to be practical. Long doubles are rarely used, so carrying a large table all the time to speed them up seems like a bad idea.
I agree.
https://github.com/llvm/llvm-project/pull/75414
More information about the libc-commits
mailing list