aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp
diff options
context:
space:
mode:
authorTue Ly <lntue@google.com>2022-03-23 15:37:19 -0400
committerTue Ly <lntue@google.com>2022-03-24 18:06:37 -0400
commitb9d87d746621c9bd1db0b6e05492c8e2ed9e39da (patch)
treec9b2b10a01331f844a57911d178f11043a9d3eeb /clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp
parente5a7d272ab04aef47bf9ae5a34ca34878353197c (diff)
downloadllvm-b9d87d746621c9bd1db0b6e05492c8e2ed9e39da.zip
llvm-b9d87d746621c9bd1db0b6e05492c8e2ed9e39da.tar.gz
llvm-b9d87d746621c9bd1db0b6e05492c8e2ed9e39da.tar.bz2
[libc] Improve the performance of exp2f.
Reduce the range-reduction table size from 128 entries down to 64 entries, and reduce the polynomial's degree from 6 down to 4. Currently we use a degree-6 minimax polynomial on an interval of length 2^-7 around 0 to compute exp2f. Based on the suggestion of @santoshn and the RLIBM project (https://github.com/rutgers-apl/rlibm-prog/blob/main/libm/float/exp2.c) it is possible to have a good polynomial of degree-4 on a subinterval of length 2^(-6) to approximate 2^x. We did try to either reduce the degree of the polynomial down to 3 or increase the interval size to 2^(-5), but in both cases the number of exceptional values exploded. So we settle with using a degree-4 polynomial of the interval of size 2^(-6) around 0. Reviewed By: michaelrj, sivachandra, zimmermann6, santoshn Differential Revision: https://reviews.llvm.org/D122346
Diffstat (limited to 'clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp')
0 files changed, 0 insertions, 0 deletions