mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-08 17:42:12 +03:00
powerpc: Add optimized P8 strspn
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.
This commit is contained in:
@@ -322,6 +322,14 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array,
|
||||
IFUNC_IMPL_ADD (array, i, strcat, 1,
|
||||
__strcat_ppc))
|
||||
|
||||
/* Support sysdeps/powerpc/powerpc64/multiarch/strspn.c. */
|
||||
IFUNC_IMPL (i, name, strspn,
|
||||
IFUNC_IMPL_ADD (array, i, strspn,
|
||||
hwcap2 & PPC_FEATURE2_ARCH_2_07,
|
||||
__strspn_power8)
|
||||
IFUNC_IMPL_ADD (array, i, strspn, 1,
|
||||
__strspn_ppc))
|
||||
|
||||
/* Support sysdeps/powerpc/powerpc64/multiarch/strstr.c. */
|
||||
IFUNC_IMPL (i, name, strstr,
|
||||
IFUNC_IMPL_ADD (array, i, strstr,
|
||||
|
Reference in New Issue
Block a user