glibc/sysdeps
Adhemerval Zanella 0e0be3ed80 math: Use tanhf from CORE-MATH
The CORE-MATH implementation is correctly rounded (for any rounding mode)
and shows slight better performance to the generic tanhf.

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                      51.5273        41.0951        20.25%
x86_64v2                    47.7021        39.1526        17.92%
x86_64v3                    45.0373        34.2737        23.90%
i686                       133.9970        83.8596        37.42%
aarch64 (Neoverse)          21.5439        14.7961        31.32%
power10                     13.3301         8.4406        36.68%

reciprocal-throughput        master        patched   improvement
x86_64                      24.9493        12.8547        48.48%
x86_64v2                    20.7051        12.7761        38.29%
x86_64v3                    19.2492        11.0851        42.41%
i686                        78.6498        29.8211        62.08%
aarch64 (Neoverse)          11.6026        7.11487        38.68%
power10                      6.3328         2.8746        54.61%

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>
2024-12-18 17:24:43 -03:00
..
aarch64 math: Use tanhf from CORE-MATH 2024-12-18 17:24:43 -03:00
alpha math: Use tanhf from CORE-MATH 2024-12-18 17:24:43 -03:00
arc math: Use tanhf from CORE-MATH 2024-12-18 17:24:43 -03:00
arm math: Use tanhf from CORE-MATH 2024-12-18 17:24:43 -03:00
csky math: Use tanhf from CORE-MATH 2024-12-18 17:24:43 -03:00
generic malloc: Optimize small memory clearing for calloc 2024-12-04 04:28:15 +08:00
gnu sysdeps: Re-flow and sort multiline gnu/Makefile definitions 2024-08-07 11:02:03 -03:00
hppa math: Use tanhf from CORE-MATH 2024-12-18 17:24:43 -03:00
htl htl: move pthread_sigmask into libc. 2024-12-14 23:13:14 +01:00
hurd hurd: Move internal functions to internal header 2024-03-23 22:43:07 +01:00
i386 math: Use tanhf from CORE-MATH 2024-12-18 17:24:43 -03:00
ieee754 math: Use tanhf from CORE-MATH 2024-12-18 17:24:43 -03:00
loongarch math: Use tanhf from CORE-MATH 2024-12-18 17:24:43 -03:00
m68k math: Use tanhf from CORE-MATH 2024-12-18 17:24:43 -03:00
mach htl: move pthread_sigmask into libc. 2024-12-14 23:13:14 +01:00
microblaze math: Use tanhf from CORE-MATH 2024-12-18 17:24:43 -03:00
mips math: Use tanhf from CORE-MATH 2024-12-18 17:24:43 -03:00
nptl linux: Add support for getrandom vDSO 2024-11-12 14:42:12 -03:00
or1k math: Use tanhf from CORE-MATH 2024-12-18 17:24:43 -03:00
posix Silence most -Wzero-as-null-pointer-constant diagnostics 2024-11-25 16:45:59 -03:00
powerpc math: Use tanhf from CORE-MATH 2024-12-18 17:24:43 -03:00
pthread Use empty initializer to silence GCC 4.9 or older 2024-12-16 04:06:30 +08:00
riscv math: Use tanhf from CORE-MATH 2024-12-18 17:24:43 -03:00
s390 math: Use tanhf from CORE-MATH 2024-12-18 17:24:43 -03:00
sh math: Use tanhf from CORE-MATH 2024-12-18 17:24:43 -03:00
sparc math: Use tanhf from CORE-MATH 2024-12-18 17:24:43 -03:00
unix Update syscall lists for Linux 6.12 2024-12-18 15:12:36 +00:00
wordsize-32 Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
wordsize-64 Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
x86 sys/platform/x86.h: Do not depend on _Bool definition in C++ mode 2024-12-18 02:32:27 +08:00
x86_64 math: Use tanhf from CORE-MATH 2024-12-18 17:24:43 -03:00