[PATCH v2 0/3] Optimize CORE-MATH internal tables
Adhemerval Zanella
adhemerval.zanella@linaro.org
Thu Feb 13 19:35:42 GMT 2025
Some implementation share internal table, which can be optimized
to avoid duplicate data. The are small code or no changes for x86_64
and powerpc64le, which do not affect performance; but on aarch64 with
gcc-14 I see a slight better code generation due the usage of ldq for
floating point constant loading.
Besides glibc own testsuite, I also checked with CORE-MATH tests
(which covers all inputs for all rounding modes).
Adhemerval Zanella (3):
math: Consolidate cospif and sinpif internal tables
math: Consolidate acospif and asinpif internal tables
math: Consolidate acosf and asinf internal tables
math/Makefile | 3 +
sysdeps/ieee754/flt-32/e_acosf.c | 19 +----
sysdeps/ieee754/flt-32/e_asinf.c | 19 +----
sysdeps/ieee754/flt-32/s_acospif.c | 53 +-------------
sysdeps/ieee754/flt-32/s_asincosf_data.c | 43 ++++++++++++
sysdeps/ieee754/flt-32/s_asincosf_data.h | 35 ++++++++++
sysdeps/ieee754/flt-32/s_asincospif_data.c | 81 ++++++++++++++++++++++
sysdeps/ieee754/flt-32/s_asincospif_data.h | 34 +++++++++
sysdeps/ieee754/flt-32/s_asinpif.c | 55 +--------------
sysdeps/ieee754/flt-32/s_cospif.c | 61 +---------------
sysdeps/ieee754/flt-32/s_sincospif_data.c | 80 +++++++++++++++++++++
sysdeps/ieee754/flt-32/s_sincospif_data.h | 37 ++++++++++
sysdeps/ieee754/flt-32/s_sinpif.c | 60 +---------------
13 files changed, 329 insertions(+), 251 deletions(-)
create mode 100644 sysdeps/ieee754/flt-32/s_asincosf_data.c
create mode 100644 sysdeps/ieee754/flt-32/s_asincosf_data.h
create mode 100644 sysdeps/ieee754/flt-32/s_asincospif_data.c
create mode 100644 sysdeps/ieee754/flt-32/s_asincospif_data.h
create mode 100644 sysdeps/ieee754/flt-32/s_sincospif_data.c
create mode 100644 sysdeps/ieee754/flt-32/s_sincospif_data.h
--
2.43.0
More information about the Libc-alpha
mailing list