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

reduce bitwise instructions #2

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

maxbachmann
Copy link

I did run into https://tech.popdata.org/speeding-up-Jaro-Winkler-with-rust-and-bitwise-operations/ today and since I have a similar implementation (here: https://github.com/maxbachmann/rapidfuzz-cpp/blob/main/rapidfuzz/distance/Jaro_impl.hpp) I looked into the way your implementation works.

This PR reduces the bitwise instructions used in the inner loop. Be aware, that I did not test this and do not know a ton about rust, so take this with a grain of salt.
Looking at godbolt this seems to help reduce the used instruction quite significantly:
https://rust.godbolt.org/z/dv79vfjfx
to
https://rust.godbolt.org/z/x4KdvYT36

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

1 participant