]> git.ipfire.org Git - thirdparty/glibc.git/commit
AArch64: Improve strlen_asimd performance (bug 25824)
authorWilco Dijkstra <wdijkstr@arm.com>
Fri, 17 Jul 2020 13:09:36 +0000 (14:09 +0100)
committerWilco Dijkstra <wdijkstr@arm.com>
Fri, 17 Jul 2020 14:07:23 +0000 (15:07 +0100)
commitf46ef33ad134bec7ac992f28ee4b8b0614590e3e
treef34fe31172e393172c15b2bb189382ad9c0b17e2
parent76b8442db51a8976de19934638a42532a3af607f
AArch64: Improve strlen_asimd performance (bug 25824)

Optimize strlen using a mix of scalar and SIMD code.  On modern micro
architectures large strings are 2.6 times faster than existing
strlen_asimd and 35% faster than the new MTE version of strlen.

On a random strlen benchmark using small sizes the speedup is 7% vs
strlen_asimd and 40% vs the MTE strlen.  This fixes the main strlen
regressions on Cortex-A53 and other cores with a simple Neon unit.

Rename __strlen_generic to __strlen_mte, and select strlen_asimd when
MTE is not enabled (this is waiting on support for a HWCAP_MTE bit).

This fixes big-endian bug 25824. Passes GLIBC regression tests.

Reviewed-by: Szabolcs Nagy <szabolcs.nagy@arm.com>
sysdeps/aarch64/multiarch/Makefile
sysdeps/aarch64/multiarch/ifunc-impl-list.c
sysdeps/aarch64/multiarch/strlen.c
sysdeps/aarch64/multiarch/strlen_asimd.S
sysdeps/aarch64/multiarch/strlen_mte.S [moved from sysdeps/aarch64/multiarch/strlen_generic.S with 88% similarity]