From d9cd52e64d7b6b0fd56566de87c826cb6fe3677d Mon Sep 17 00:00:00 2001 From: Chris Metcalf Date: Thu, 25 Sep 2014 16:49:38 -0400 Subject: tile: optimize memcmp Customize memcmp.c for tile, using similar tricks from memcpy: - replace MERGE macro with dblalign. - replace memcmp_bytes function with revbytes. - use __glibc_likely. - use post-increment addressing. The schedule is still not perfect: the compiler is not hoisting code above the comparison branch, which could save a bundle or two. memcmp speeds up by 30-40% on shorter aligned tests in benchtest, with some tests with unaligned lengths taking a small performance hit. --- ChangeLog | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 44a45e209a..7dd6029d2c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2014-10-02 Chris Metcalf + * sysdeps/tile/memcmp.c: New file. + * sysdeps/unix/sysv/linux/tile/sysconf.c: New file. * sysdeps/tile/tilegx/string-endian.h (STRSHIFT): New macro. -- cgit v1.2.3