]> git.feebdaed.xyz Git - 0xmirror/glibc.git/commit
aarch64: Optimise AdvSIMD acoshf
authorJames Chesterman <James.Chesterman@arm.com>
Fri, 28 Nov 2025 11:18:51 +0000 (11:18 +0000)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Thu, 4 Dec 2025 13:54:49 +0000 (10:54 -0300)
commit0e80864c07ffb549557e3c317b6b5326444da95e
tree43d589ccc8f096d9d7d595a9791938aed7b69e78
parent6f869f54fb3e066964fc7138e36433de793244af
aarch64: Optimise AdvSIMD acoshf

Optimise AdvSIMD acoshf by vectorising the special case.
For values greater than 0x1p64, scale the input down first.
This is because the output will overflow with inputs greater than
or equal to this value as there is a squaring operation in the
algorithm.
To scale, do:
2acosh(sqrt[(x+1)/2])
Because:
acosh(x) = 1/2acosh(2x^2 - 1) for x>=1.
Apply opposite operations in opposite order for x, and you get:
acosh(x) = 2acosh(sqrt[(x+1)/2]).

R.Throughput difference on V2 with GCC@15:
30-49% improvement in special cases.
2% regression in fast pass.
sysdeps/aarch64/fpu/acoshf_advsimd.c