powerpc: Optimized stpcpy for POWER9

System Internals / glibc - Anton Blanchard via Libc-alpha [sourceware.org] - 18 May 2020 13:26 EDT

Add stpcpy support to the POWER9 strcpy. This is up to 40% faster on small strings and up to 90% faster on long relatively unaligned strings, compared to the POWER8 version. A few examples:

__stpcpy_power9 __stpcpy_power8 Length 20, alignments in bytes 4/ 4: 2.58246 4.8788 Length 1024, alignments in bytes 1/ 6: 24.8186 47.8528

aa70d05632 powerpc: Optimized stpcpy for POWER9
sysdeps/powerpc/powerpc64/le/power9/stpcpy.S | 24 +++++++
sysdeps/powerpc/powerpc64/le/power9/strcpy.S | 73 +++++++++++++++++-----
sysdeps/powerpc/powerpc64/multiarch/Makefile | 2 +-
.../powerpc/powerpc64/multiarch/ifunc-impl-list.c | 4 ++
.../powerpc/powerpc64/multiarch/stpcpy-power9.S | 24 +++++++
sysdeps/powerpc/powerpc64/multiarch/stpcpy.c | 17 +++--
6 files changed, 123 insertions(+), 21 deletions(-)

Upstream: sourceware.org


  • Share