about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSiddhesh Poyarekar <siddhesh@sourceware.org>2017-12-13 18:50:27 +0530
committerWilco Dijkstra <wdijkstr@arm.com>2019-09-06 16:56:45 +0100
commit7f690fafad5013d1f21fd434a4b4f2482128b97c (patch)
treec476b1032eaf0c81db3b6be5e0b6d7479b6849e1
parent40df047b3b3f53895c7f75267d7f57a643678da5 (diff)
downloadglibc-7f690fafad5013d1f21fd434a4b4f2482128b97c.tar.gz
glibc-7f690fafad5013d1f21fd434a4b4f2482128b97c.tar.xz
glibc-7f690fafad5013d1f21fd434a4b4f2482128b97c.zip
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)
-rw-r--r--ChangeLog5
1 files changed, 5 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 20d98f0822..436aee29ea 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.