[libc-commits] [PATCH] D107462: [libc] Add diff and perf targets for more math functions

Hedin GarcĂ­a via Phabricator via libc-commits libc-commits at lists.llvm.org
Wed Aug 4 07:40:18 PDT 2021


hedingarcia created this revision.
hedingarcia added reviewers: sivachandra, aeubanks.
Herald added subscribers: libc-commits, ecnelises, tschuett, mgorny.
Herald added a project: libc-project.
hedingarcia requested review of this revision.

Comparing the run time of math functions from LLVM libc
with the MSVCRT libc:

| function   | perf-LLVM libc   | perf-MSVCRT       |
| ceilf      | 2.36 mins (141491389600 ns) | 47.10 sec (47100940100 ns)  |
| expf       | 6.35 mins (381204661800 ns) | 6.17 mins (346150163200 ns)  |
| fabsf      | 1.18 mins (78425546600 ns) | 53.75 sec (53745301900 ns)  |
| floorf     | 3.15 mins (164770963800 ns) | 45.94 sec (45935988400 ns)  |
| logbf      | 4.38 mins (262508058800 ns) | 55.47 sec (55466377700 ns)  |
| nearbyintf | 3.20 mins (167972868000 ns) | 9.13 mins (523822963600 ns)  |
| rintf      | 3.20 mins (168001498700 ns) | 22.35 mins (1341266448800 ns) |
| roundf     | 2.35 mins (141151500600 ns) | 1.42 mins (85326429800 ns)  |
| truncf     | 2.31 mins (114846424000 ns) | 59.41 sec (59414309100 ns)  |
|

Evaluating the number of differing results in Windows:

| function   | diff                     |
| ceilf      | 8388606 differing results      |
| expf       | 193922 differing results |
| fabsf      | 8388606 differing results      |
| floorf     | 8388606 differing results      |
| logbf      | 0 differing results      |
| nearbyintf | 0 differing results      |
| rintf      | 0 differing results      |
| roundf     | 0 differing results      |
| truncf     | 0 differing results      |


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D107462

Files:
  libc/test/src/math/differential_testing/CMakeLists.txt
  libc/test/src/math/differential_testing/ceilf_diff.cpp
  libc/test/src/math/differential_testing/ceilf_perf.cpp
  libc/test/src/math/differential_testing/expf_diff.cpp
  libc/test/src/math/differential_testing/expf_perf.cpp
  libc/test/src/math/differential_testing/fabsf_diff.cpp
  libc/test/src/math/differential_testing/fabsf_perf.cpp
  libc/test/src/math/differential_testing/floorf_diff.cpp
  libc/test/src/math/differential_testing/floorf_perf.cpp
  libc/test/src/math/differential_testing/logbf_diff.cpp
  libc/test/src/math/differential_testing/logbf_perf.cpp
  libc/test/src/math/differential_testing/nearbyintf_diff.cpp
  libc/test/src/math/differential_testing/nearbyintf_perf.cpp
  libc/test/src/math/differential_testing/rintf_diff.cpp
  libc/test/src/math/differential_testing/rintf_perf.cpp
  libc/test/src/math/differential_testing/roundf_diff.cpp
  libc/test/src/math/differential_testing/roundf_perf.cpp
  libc/test/src/math/differential_testing/truncf_diff.cpp
  libc/test/src/math/differential_testing/truncf_perf.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D107462.364104.patch
Type: text/x-patch
Size: 18083 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20210804/a37c9d53/attachment-0001.bin>


More information about the libc-commits mailing list