summaryrefslogtreecommitdiffstats
path: root/lib/decompress_unxz.c
diff options
context:
space:
mode:
authorRobin Murphy <robin.murphy@arm.com>2021-05-27 17:34:47 +0200
committerWill Deacon <will@kernel.org>2021-06-01 19:34:38 +0200
commit9e51cafd783b22018fb15bfb06d65f69349223a9 (patch)
treec108c0a87007cf8061ba0dd5ae71c4e5a5fdc795 /lib/decompress_unxz.c
parentarm64: Import latest memcpy()/memmove() implementation (diff)
downloadlinux-9e51cafd783b22018fb15bfb06d65f69349223a9.tar.xz
linux-9e51cafd783b22018fb15bfb06d65f69349223a9.zip
arm64: Better optimised memchr()
Although we implement our own assembly version of memchr(), it turns out to be barely any better than what GCC can generate for the generic C version (and would go wrong if the size_t argument were ever large enough to be interpreted as negative). Unfortunately we can't import the tuned implementation from the Arm optimized-routines library, since that has some Advanced SIMD parts which are not really viable for general kernel library code. What we can do, however, is pep things up with some relatively straightforward word-at-a-time logic for larger calls. Adding some timing to optimized-routines' memchr() test for a simple benchmark, overall this version comes in around half as fast as the SIMD code, but still nearly 4x faster than our existing implementation. Signed-off-by: Robin Murphy <robin.murphy@arm.com> Link: https://lore.kernel.org/r/58471b42f9287e039dafa9e5e7035077152438fd.1622128527.git.robin.murphy@arm.com Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'lib/decompress_unxz.c')
0 files changed, 0 insertions, 0 deletions