[all-commits] [llvm/llvm-project] 91ee67: [libc] Use nearest_integer instructions to improve...
lntue via All-commits
all-commits at lists.llvm.org
Tue Jul 26 06:11:53 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 91ee67206289ec80c3c02f063040fa4638be0d63
https://github.com/llvm/llvm-project/commit/91ee67206289ec80c3c02f063040fa4638be0d63
Author: Tue Ly <lntue at google.com>
Date: 2022-07-26 (Tue, 26 Jul 2022)
Changed paths:
M libc/docs/math.rst
M libc/src/math/generic/CMakeLists.txt
M libc/src/math/generic/expf.cpp
Log Message:
-----------
[libc] Use nearest_integer instructions to improve expf performance.
Use nearest_integer instructions to improve expf performance.
Performance tests with CORE-MATH's perf tool:
Before the patch:
```
$ ./perf.sh expf
LIBC-location: /home/lnt/experiment/llvm-project/build/projects/libc/lib/libllvmlibc.a
GNU libc version: 2.31
GNU libc release: stable
CORE-MATH reciprocal throughput : 9.860
System LIBC reciprocal throughput : 7.728
LIBC reciprocal throughput : 12.363
$ ./perf.sh expf --latency
LIBC-location: /home/lnt/experiment/llvm-project/build/projects/libc/lib/libllvmlibc.a
GNU libc version: 2.31
GNU libc release: stable
CORE-MATH latency : 42.802
System LIBC latency : 35.941
LIBC latency : 49.808
```
After the patch:
```
$ ./perf.sh expf
LIBC-location: /home/lnt/experiment/llvm/llvm-project/build/projects/libc/lib/libllvmlibc.a
GNU libc version: 2.31
GNU libc release: stable
CORE-MATH reciprocal throughput : 9.441
System LIBC reciprocal throughput : 7.382
LIBC reciprocal throughput : 8.843
$ ./perf.sh expf --latency
LIBC-location: /home/lnt/experiment/llvm/llvm-project/build/projects/libc/lib/libllvmlibc.a
GNU libc version: 2.31
GNU libc release: stable
CORE-MATH latency : 44.192
System LIBC latency : 37.693
LIBC latency : 44.145
```
Reviewed By: zimmermann6
Differential Revision: https://reviews.llvm.org/D130498
More information about the All-commits
mailing list