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

Branchless checking for ASCII #68

Merged
merged 1 commit into from Apr 8, 2022

Conversation

rhpvorderman
Copy link
Collaborator

This is 20% faster for the ascii check. But 20% faster on something that is not a bottleneck is not really noticable. Still, I don't like wasting compute cycles and this makes the code simpler and without branches.

I have been fiddling a bit with the ascii-check repo. I also added an SSE2 implementation in that repo. SSE2 in particular is a very interesting instruction set because all x86-64 CPUs support it. No exceptions. So it can always be included in the x86-64 builds.

That implementation cuts the ASCII checking time in more than half, so that might be interesting to look at. I will add that later after this is merged.

@marcelm
Copy link
Owner

marcelm commented Apr 8, 2022

I forgot about this one.

@marcelm marcelm merged commit 58021f9 into marcelm:main Apr 8, 2022
@rhpvorderman rhpvorderman deleted the fasterasciicheck branch April 15, 2022 04:59
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

Successfully merging this pull request may close these issues.

None yet

2 participants