Skip to content
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

Use _mm_testz_si128() in check_indices() #2

Open
nkurz opened this issue Apr 25, 2014 · 0 comments
Open

Use _mm_testz_si128() in check_indices() #2

nkurz opened this issue Apr 25, 2014 · 0 comments

Comments

@nkurz
Copy link

nkurz commented Apr 25, 2014

Looks like a nice project!

Untested, but you could probably get a boost by using _mm_testz_si128() in check_indices(). It combines the operations you are doing with _mm_and_si128, _mm_movemask_epi8, and the comparison into a single instruction (PTEST). It requires SSE4.1, but this is pretty universally supported at this point.

Good documentation for it here: http://software.intel.com/sites/landingpage/IntrinsicsGuide/
(search for PTEST or testz)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant