-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vectorize search
#4654
base: main
Are you sure you want to change the base?
vectorize search
#4654
Conversation
The difference in "before" results between It is curious that I would want someone else to confirm the results, and maintainers decision what to do with this. |
A possible way to handle it is to remove 32 and 64 bit optimization/vectorization attempts at all, so that |
And if we are to keep vectorization only for 8-bit and 16-bit elements, we may drop the current implementation and not review/commit it in the first place, if SSE4.2 |
Resolves #2453
Before:
After:
strstr
is given for a reference in the benchmark, it is not affected by the optimization.It may be impossible to reach
strstr
performance, as it usespcmpistri
(and reading beyond the last element, aspcmpistri
is not very useful otherwise). We can trypcmpestri
for 8-bit and 16-bit cases, but still it may be not as efficient, asstrstr
. I'd prefer to try this additional optimization in a next PR though.