aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-objdump/llvm-objdump.cpp
diff options
context:
space:
mode:
authorKirill Okhotnikov <okir@google.com>2022-06-06 10:10:24 +0200
committerKirill Okhotnikov <okir@google.com>2022-06-24 23:09:14 +0200
commitb8e8012aa2ede55be77173b918b4d6363b55c9d1 (patch)
tree77f444f67f9b39fac31239797ecdde9061bb423b /llvm/tools/llvm-objdump/llvm-objdump.cpp
parent5c29ffda9056e1b4602a46051371f0184ce357b2 (diff)
downloadllvm-b8e8012aa2ede55be77173b918b4d6363b55c9d1.zip
llvm-b8e8012aa2ede55be77173b918b4d6363b55c9d1.tar.gz
llvm-b8e8012aa2ede55be77173b918b4d6363b55c9d1.tar.bz2
[libc][math] fmod/fmodf implementation.
This is a implementation of find remainder fmod function from standard libm. The underline algorithm is developed by myself, but probably it was first invented before. Some features of the implementation: 1. The code is written on more-or-less modern C++. 2. One general implementation for both float and double precision numbers. 3. Spitted platform/architecture dependent and independent code and tests. 4. Tests covers 100% of the code for both float and double numbers. Tests cases with NaN/Inf etc is copied from glibc. 5. The new implementation in general 2-4 times faster for “regular” x,y values. It can be 20 times faster for x/y huge value, but can also be 2 times slower for double denormalized range (according to perf tests provided). 6. Two different implementation of division loop are provided. In some platforms division can be very time consuming operation. Depend on platform it can be 3-10 times slower than multiplication. Performance tests: The test is based on core-math project (https://gitlab.inria.fr/core-math/core-math). By Tue Ly suggestion I took hypot function and use it as template for fmod. Preserving all test cases. `./check.sh <--special|--worst> fmodf` passed. `CORE_MATH_PERF_MODE=rdtsc ./perf.sh fmodf` results are ``` GNU libc version: 2.35 GNU libc release: stable 21.166 <-- FPU 51.031 <-- current glibc 37.659 <-- this fmod version. ```
Diffstat (limited to 'llvm/tools/llvm-objdump/llvm-objdump.cpp')
0 files changed, 0 insertions, 0 deletions