Skip to content
Commit 412d1034 authored by Noah Goldstein's avatar Noah Goldstein
Browse files

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: default avatarH.J. Lu <hjl.tools@gmail.com>
parent 30d627d4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment