]> git.ipfire.org Git - thirdparty/glibc.git/commit
AArch64: Optimize strnlen
authorWilco Dijkstra <wilco.dijkstra@arm.com>
Wed, 11 Jan 2023 13:53:05 +0000 (13:53 +0000)
committerWilco Dijkstra <wilco.dijkstra@arm.com>
Tue, 9 Apr 2024 17:40:41 +0000 (18:40 +0100)
commit3527d31d0bbafcc8b5b18eb9ebc5f290adeec495
treee2c5c913929c9b433a95553b20541244a78f9f2f
parent12784e1d82f6b55b3c7bac887107f06353c1ace0
AArch64: Optimize strnlen

Optimize strnlen using the shrn instruction and improve the main loop.
Small strings are around 10% faster, large strings are 40% faster on
modern CPUs.

Reviewed-by: Szabolcs Nagy <szabolcs.nagy@arm.com>
(cherry picked from commit ad098893ba3c3344a5f2f6ab1627c47204afdb47)
sysdeps/aarch64/strnlen.S