[all-commits] [llvm/llvm-project] a62119: [libc] Move printf long double to simple calc (#75...
michaelrj-google via All-commits
all-commits at lists.llvm.org
Thu Jan 25 09:35:54 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: a621198a035cdc700f08507879db902f22f8a5e2
https://github.com/llvm/llvm-project/commit/a621198a035cdc700f08507879db902f22f8a5e2
Author: michaelrj-google <71531609+michaelrj-google at users.noreply.github.com>
Date: 2024-01-25 (Thu, 25 Jan 2024)
Changed paths:
M libc/config/config.json
M libc/docs/dev/printf_behavior.rst
M libc/src/__support/UInt.h
M libc/src/__support/float_to_string.h
M libc/test/src/stdio/sprintf_test.cpp
M utils/bazel/llvm-project-overlay/libc/BUILD.bazel
Log Message:
-----------
[libc] Move printf long double to simple calc (#75414)
The Ryu algorithm is very fast with its table, but that table grows too
large for long doubles. This patch adds a method of calculating the
digits of long doubles using just wide integers and fast modulo
operations. This results in significant performance improvements vs the
previous int calc mode, while taking up a similar amound of peak memory.
It will be slow in some %e/%g cases, but reasonable fast for %f with no
loss of accuracy.
More information about the All-commits
mailing list