]> 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>
Mon, 8 Apr 2024 16:27:24 +0000 (17:27 +0100)
commit06fad282742214d5fd9dbc3aa7077d9882edbd71
tree49cae5bee86be8c5b647a40e984d3cdc30c79ac9
parent3a1557efef9d3aa334122f44c495dd0c5d78b787
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