]> sourceware.org Git - glibc.git/commit
x86: Optimize strspn in strspn-c.c
authorNoah Goldstein <goldstein.w.n@gmail.com>
Wed, 23 Mar 2022 21:57:24 +0000 (16:57 -0500)
committerNoah Goldstein <goldstein.w.n@gmail.com>
Fri, 25 Mar 2022 16:46:13 +0000 (11:46 -0500)
commit412d10343168b05b8cf6c3683457cf9711d28046
tree5b141d96031b2ff23400528d4d046361553fad2f
parent30d627d477d7255345a4b713cf352ac32d644d61
x86: Optimize strspn in strspn-c.c

Use _mm_cmpeq_epi8 and _mm_movemask_epi8 to get strlen instead of
_mm_cmpistri. Also change offset to unsigned to avoid unnecessary
sign extensions.

geometric_mean(N=20) of all benchmarks that dont fallback on
sse2; New / Original: .901

All string/memory tests pass.
Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
sysdeps/x86_64/multiarch/strspn-c.c
This page took 0.038973 seconds and 5 git commands to generate.