]> git.ipfire.org Git - thirdparty/glibc.git/commit - ChangeLog
tile: optimize memcmp
authorChris Metcalf <cmetcalf@tilera.com>
Thu, 25 Sep 2014 20:49:38 +0000 (16:49 -0400)
committerChris Metcalf <cmetcalf@tilera.com>
Mon, 6 Oct 2014 15:20:59 +0000 (11:20 -0400)
commitd9cd52e64d7b6b0fd56566de87c826cb6fe3677d
tree2e79c9dae8aaf921b08bd73c3af19d65879545cd
parent4b68ea1162f39f62590e49eb5d4371871e071f32
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
sysdeps/tile/memcmp.c [new file with mode: 0644]