]> 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 16:37:47 +0000 (17:37 +0100)
commit34bf1b598e18001981aff84137bdb9abdfaf4cd9
tree9d1cfd536da33606b9324b98218661fcfc1dc099
parent07666811d46e4ca2bdf1d28b780f030820d6b626
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