]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
aarch64: Improve strcmp unaligned performance
authorSiddhesh Poyarekar <siddhesh@sourceware.org>
Wed, 13 Dec 2017 13:20:27 +0000 (18:50 +0530)
committerWilco Dijkstra <wdijkstr@arm.com>
Fri, 6 Sep 2019 15:56:45 +0000 (16:56 +0100)
Replace the simple byte-wise compare in the misaligned case with a
dword compare with page boundary checks in place.  For simplicity I've
chosen a 4K page boundary so that we don't have to query the actual
page size on the system.

This results in up to 3x improvement in performance in the unaligned
case on falkor and about 2.5x improvement on mustang as measured using
bench-strcmp.

* sysdeps/aarch64/strcmp.S (misaligned8): Compare dword at a
time whenever possible.

(cherry picked from commit 2bce01ebbaf8db52ba4a5635eb5744f989cdbf69)

ChangeLog

index 20d98f08226373f51a3bdfa46acdd2824841c740..436aee29eabbd38934c5f95637ce89ad58c21c33 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2019-09-06  Siddhesh Poyarekar  <siddhesh@sourceware.org>
+
+       * sysdeps/aarch64/strcmp.S (misaligned8): Compare dword at a
+       time whenever possible.
+
 2019-09-06  Siddhesh Poyarekar  <siddhesh@sourceware.org>
 
        * sysdeps/aarch64/memcmp.S: Widen comparison to 16 bytes at a