[all-commits] [llvm/llvm-project] 2ff187: [libc] Implement cosf function that is correctly r...
lntue via All-commits
all-commits at lists.llvm.org
Fri Jul 29 18:08:50 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 2ff187fbc9f234303fa8905d74faef24643411e0
https://github.com/llvm/llvm-project/commit/2ff187fbc9f234303fa8905d74faef24643411e0
Author: Tue Ly <lntue at google.com>
Date: 2022-07-29 (Fri, 29 Jul 2022)
Changed paths:
M libc/docs/math.rst
M libc/src/math/generic/CMakeLists.txt
M libc/src/math/generic/cosf.cpp
M libc/test/src/math/cosf_test.cpp
M libc/test/src/math/exhaustive/CMakeLists.txt
M libc/test/src/math/exhaustive/cosf_test.cpp
M utils/bazel/llvm-project-overlay/libc/BUILD.bazel
Log Message:
-----------
[libc] Implement cosf function that is correctly rounded to all rounding modes.
Implement cosf function that is correctly rounded to all rounding
modes.
Performance benchmark using perf tool from CORE-MATH project
(https://gitlab.inria.fr/core-math/core-math/-/tree/master) on Ryzen 1700:
Before this patch (not correctly rounded):
```
$ CORE_MATH_PERF_MODE="rdtsc" ./perf.sh cosf
CORE-MATH reciprocal throughput : 19.043
System LIBC reciprocal throughput : 26.328
LIBC reciprocal throughput : 30.955
$ CORE_MATH_PERF_MODE="rdtsc" ./perf.sh cosf --latency
GNU libc version: 2.31
GNU libc release: stable
CORE-MATH latency : 49.995
System LIBC latency : 59.286
LIBC latency : 60.174
```
After this patch (correctly rounded):
```
$ CORE_MATH_PERF_MODE="rdtsc" ./perf.sh cosf
GNU libc version: 2.31
GNU libc release: stable
CORE-MATH reciprocal throughput : 19.072
System LIBC reciprocal throughput : 26.286
LIBC reciprocal throughput : 13.631
$ CORE_MATH_PERF_MODE="rdtsc" ./perf.sh cosf --latency
GNU libc version: 2.31
GNU libc release: stable
CORE-MATH latency : 49.872
System LIBC latency : 59.468
LIBC latency : 56.119
```
Reviewed By: orex, zimmermann6
Differential Revision: https://reviews.llvm.org/D130644
More information about the All-commits
mailing list