]> git.ipfire.org Git - thirdparty/glibc.git/commit
aarch64: Increase small and medium cases for __memcpy_generic
authorKrzysztof Koch <Krzysztof.Koch@arm.com>
Tue, 5 Nov 2019 17:35:18 +0000 (17:35 +0000)
committerWilco Dijkstra <wdijkstr@arm.com>
Wed, 14 Oct 2020 16:29:12 +0000 (17:29 +0100)
commit722c93572e6344223cab8fbf78d2846a453f2487
tree352662be63f3d19b3f304c4ba5b34c8bd9763acc
parentb915da29dab5d8c6b9cdb1ee6fdc1e0ec6ef39e1
aarch64: Increase small and medium cases for __memcpy_generic

Increase the upper bound on medium cases from 96 to 128 bytes.
Now, up to 128 bytes are copied unrolled.

Increase the upper bound on small cases from 16 to 32 bytes so that
copies of 17-32 bytes are not impacted by the larger medium case.

Benchmarking:
The attached figures show relative timing difference with respect
to 'memcpy_generic', which is the existing implementation.
'memcpy_med_128' denotes the the version of memcpy_generic with
only the medium case enlarged. The 'memcpy_med_128_small_32' numbers
are for the version of memcpy_generic submitted in this patch, which
has both medium and small cases enlarged. The figures were generated
using the script from:
https://www.sourceware.org/ml/libc-alpha/2019-10/msg00563.html

Depending on the platform, the performance improvement in the
bench-memcpy-random.c benchmark ranges from 6% to 20% between
the original and final version of memcpy.S

Tested against GLIBC testsuite and randomized tests.

(cherry picked from commit b9f145df85145506f8e61bac38b792584a38d88f)
sysdeps/aarch64/memcpy.S