powerpc: Add optimized P8 strspn

System Internals / glibc - Paul E. Murphy [linux.vnet.ibm.com] - 7 April 2016 15:51 UTC

This utilizes vectors and bitmasks. For small needle, large haystack, the performance improvement is upto 8x. For short strings (0-4B), the cost of computing the bitmask dominates, and is a tad slower.

25dba0a powerpc: Add optimized P8 strspn
ChangeLog | 15 ++
sysdeps/powerpc/powerpc64/multiarch/Makefile | 3 +-
.../powerpc/powerpc64/multiarch/ifunc-impl-list.c | 8 +
.../powerpc/powerpc64/multiarch/strspn-power8.S | 40 +++++
sysdeps/powerpc/powerpc64/multiarch/strspn-ppc64.c | 25 +++
sysdeps/powerpc/powerpc64/multiarch/strspn.c | 35 ++++
sysdeps/powerpc/powerpc64/power8/strspn.S | 179 ++++++++++++++++++++
7 files changed, 304 insertions(+), 1 deletion(-)

Upstream: sourceware.org


  • Share