powerpc: Optimized rawmemchr for POWER9

System Internals / glibc - Anton Blanchard [ozlabs.org] - 18 May 2020 22:08 EDT

This version uses vector instructions and is up to 60% faster on medium matches and up to 90% faster on long matches, compared to the POWER7
version. A few examples:

__rawmemchr_power9 __rawmemchr_power7 Length 32, alignment 0: 2.27566 3.77765 Length 64, alignment 2: 2.46231 3.51064 Length 1024, alignment 0: 17.3059 32.6678

765de945ef powerpc: Optimized rawmemchr for POWER9
sysdeps/powerpc/powerpc64/le/power9/rawmemchr.S | 107 +++++++++++++++++++++
sysdeps/powerpc/powerpc64/multiarch/Makefile | 3 +-
.../powerpc/powerpc64/multiarch/ifunc-impl-list.c | 5 +
.../powerpc/powerpc64/multiarch/rawmemchr-power9.S | 21 ++++
sysdeps/powerpc/powerpc64/multiarch/rawmemchr.c | 12 ++-
5 files changed, 145 insertions(+), 3 deletions(-)

Upstream: sourceware.org


  • Share