diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2025-06-16 10:17:34 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2025-06-18 15:56:40 -0300 |
commit | f165e244e4c72493cf52cd6c98f989321f29c677 (patch) | |
tree | 7624c44dfb1c93bfe5133848577498281cd734b2 /benchtests/inet_ntop_ipv4-source.c | |
parent | 61cc9922f3cdcd71ed8977016b8180d409826240 (diff) | |
download | glibc-f165e244e4c72493cf52cd6c98f989321f29c677.zip glibc-f165e244e4c72493cf52cd6c98f989321f29c677.tar.gz glibc-f165e244e4c72493cf52cd6c98f989321f29c677.tar.bz2 |
math: Simplify and optimize modf implementation
Refactor the generic implementation to use math_config.h definitions,
and add an alternative one if the ABI supports truncf instructions
(gated through math-use-builtins-trunc.h).
The generic implementation generates similar code on x86_64, while
the optimization one for aarch64 (where truncf is supported as a
builtin by through frintz), the improvements are:
reciprocal-throughput master patch difference
workload-0_1 3.0595 3.0698 -0.34%
workload-1_maxint 5.1747 3.0542 40.98%
workload-maxint_maxfloat 3.4391 3.0349 11.75%
workload-integral 3.2732 3.0293 7.45%
latency master patch difference
workload-0_1 3.5267 4.7107 -33.57%
workload-1_maxint 6.9074 4.7282 31.55%
workload-maxint_maxfloat 3.7210 4.7506 -27.67%
workload-integral 3.8634 4.8137 -24.60%
Checked on aarch64-linux-gnu and x86_64-linux-gnu.
Reviewed-by: Wilco Dijkstra <Wilco.Dijkstra@arm.com>
Diffstat (limited to 'benchtests/inet_ntop_ipv4-source.c')
0 files changed, 0 insertions, 0 deletions