about summary refs log tree commit diff
path: root/SHARED-FILES
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2024-10-25 15:21:49 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2024-11-01 11:27:35 -0300
commitbbd578b38df4ef417acc9af332fa2ddbb4952df4 (patch)
treecc71c3652b5d47db815a62283c1633b21c946163 /SHARED-FILES
parent5c22fd25c15ff56583ca8588f137d8e59d775752 (diff)
downloadglibc-bbd578b38df4ef417acc9af332fa2ddbb4952df4.tar.gz
glibc-bbd578b38df4ef417acc9af332fa2ddbb4952df4.tar.xz
glibc-bbd578b38df4ef417acc9af332fa2ddbb4952df4.zip
math: Use expm1f from CORE-MATH
The CORE-MATH implementation is correctly rounded (for any rounding mode)
and shows better performance compared to the generic expm1f.

The code was adapted to glibc style and to use the definition of
math_config.h (to handle errno, overflow, and underflow).

Benchtest on x64_64 (Ryzen 9 5900X, gcc 14.2.1), aarch64 (Neoverse-N1,
gcc 13.3.1), and powerpc (POWER10, gcc 13.2.1):

Latency                      master        patched   improvement
x86_64                      96.7402        36.4026        62.37%
x86_64v2                    97.5391        33.4625        65.69%
x86_64v3                    82.1778        30.8668        62.44%
i686                         120.58        94.8302        21.35%
aarch64                     32.3558        12.8881        60.17%
power10                     23.5087        9.8574         58.07%
powerpc                     23.4776        9.06325        61.40%

reciprocal-throughput        master        patched   improvement
x86_64                      27.8224        15.9255        42.76%
x86_64v2                    27.8364        9.6438         65.36%
x86_64v3                    20.3227        9.6146         52.69%
i686                        63.5629        59.4718         6.44%
aarch64                     17.4838        7.1082         59.34%
power10                     12.4644        8.7829         29.54%
powerpc                     14.2152        5.94765        58.16%

Signed-off-by: Alexei Sibidanov <sibid@uvic.ca>
Signed-off-by: Paul Zimmermann <Paul.Zimmermann@inria.fr>
Signed-off-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Reviewed-by: DJ Delorie <dj@redhat.com>
Diffstat (limited to 'SHARED-FILES')
-rw-r--r--SHARED-FILES4
1 files changed, 4 insertions, 0 deletions
diff --git a/SHARED-FILES b/SHARED-FILES
index 0c85e2e1b5..7b10d0eff0 100644
--- a/SHARED-FILES
+++ b/SHARED-FILES
@@ -248,3 +248,7 @@ sysdeps/ieee754/flt-32/s_exp2m1f.c
   (file src/binary32/exp2m1/exp2m1f.c in CORE-MATH)
   - The code was adapted to use glibc code style and internal
     functions to handle errno, overflow, and underflow.
+sysdeps/ieee754/flt-32/s_expm1f.c
+  (file src/binary32/expm1/expm1f.c in CORE-MATH)
+  - The code was adapted to use glibc code style and internal
+    functions to handle errno, overflow, and underflow.