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, 17 Jan 2023 15:09:18 +0000 (15:09 +0000)
commitad098893ba3c3344a5f2f6ab1627c47204afdb47
tree91d9ebc4e4ca1b8624eb93bd60e63236bb73c4c1
parent03c8ce5000198947a4dd7b2c14e5131738fda62b
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>
sysdeps/aarch64/strnlen.S