[PATCH 03/10] Improve performance of sinf and cosf
Szabolcs Nagy
szabolcs.nagy@arm.com
Fri Jul 6 08:59:00 GMT 2018
v4:
- remove x86_64 s_sincosf_data.c as now it is used for sinf and cosf.
The second patch improves performance of sinf and cosf using the same
algorithms and polynomials. The returned values are identical to sincosf
for the same input. ULP definitions for AArch64 and x64 are updated.
sinf/cosf througput gains on Cortex-A72:
* |x| < 0x1p-12 : 1.2x
* |x| < M_PI_4 : 1.8x
* |x| < 2 * M_PI: 1.7x
* |x| < 120.0 : 2.3x
* |x| < Inf : 3.0x
ChangeLog:
2018-07-06 Wilco Dijkstra <wdijkstr@arm.com>
Szabolcs Nagy <szabolcs.nagy@arm.com>
* NEWS: Mention sinf, cosf, sincosf.
* sysdeps/aarch64/libm-test-ulps: Update ULP for sinf, cosf, sincosf.
* sysdeps/x86_64/fpu/libm-test-ulps: Update ULP for sinf and cosf.
* sysdeps/x86_64/fpu/multiarch/s_sincosf-fma.c: Add definitions of
constants rather than including generic sincosf.h.
* sysdeps/x86_64/fpu/s_sincosf_data.c: Remove.
* sysdeps/ieee754/flt-32/s_cosf.c (cosf): Rewrite.
* sysdeps/ieee754/flt-32/s_sincosf.h (reduced_sin): Remove.
(reduced_cos): Remove.
(sinf_poly): New function.
* sysdeps/ieee754/flt-32/s_sinf.c (sinf): Rewrite.
---
NEWS | 2 +
sysdeps/aarch64/libm-test-ulps | 24 ++--
sysdeps/ieee754/flt-32/s_cosf.c | 161 ++++++++-----------------
sysdeps/ieee754/flt-32/s_sincosf.h | 171 +++++---------------------
sysdeps/ieee754/flt-32/s_sinf.c | 172 +++++++++------------------
sysdeps/x86_64/fpu/libm-test-ulps | 12 ++
sysdeps/x86_64/fpu/multiarch/s_sincosf-fma.c | 33 ++++-
sysdeps/x86_64/fpu/s_sincosf_data.c | 1 -
8 files changed, 192 insertions(+), 384 deletions(-)
delete mode 100644 sysdeps/x86_64/fpu/s_sincosf_data.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Improve-performance-of-sinf-and-cosf.diff
Type: text/x-patch
Size: 20809 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20180706/74a6d8f3/attachment.bin>
More information about the Libc-alpha
mailing list