This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
[glibc/release/2.27/master] aarch64: Improve strcmp unaligned performance
- From: Wilco Dijkstra <wilco at sourceware dot org>
- To: glibc-cvs at sourceware dot org
- Date: 6 Sep 2019 16:30:52 -0000
- Subject: [glibc/release/2.27/master] aarch64: Improve strcmp unaligned performance
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=7f690fafad5013d1f21fd434a4b4f2482128b97c
commit 7f690fafad5013d1f21fd434a4b4f2482128b97c
Author: Siddhesh Poyarekar <siddhesh@sourceware.org>
Date: Wed Dec 13 18:50:27 2017 +0530
aarch64: Improve strcmp unaligned performance
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)
Diff:
---
ChangeLog | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 20d98f0..436aee2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
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
time.