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

Allow odd length prefix #9

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

gpsanant
Copy link

@gpsanant gpsanant commented Oct 14, 2023

allows for odd length prefixes.

still uses efficient logic for even length prefixes, uses less efficient logic for odd length prefixes.

disclaimer: I barely know rust

@nlordell
Copy link
Owner

Thanks for the contribution! One issue I see with the current implementation is that it allocates a Vec on the heap for each check. Ideally, it would be possible to do without this by comparing the bytes directly and potentially using a mask for the last nibble.

I'm not sure what the best way to structure the code for this would be.

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.

2 participants