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

Pure String Literal searching #21

Open
neeldug opened this issue Oct 3, 2020 · 1 comment
Open

Pure String Literal searching #21

neeldug opened this issue Oct 3, 2020 · 1 comment

Comments

@neeldug
Copy link

neeldug commented Oct 3, 2020

I saw on the README that there was an opportunity to improve the algorithm used for pure string literal searching, I'm trying to implement the crate boyer-moore-magiclen, to improve this, however, I'm unable to work out exactly where regress searches for these, my inclination was to start here. It'd be much appreciated if anyone could point me in the right direction for where to start!

@ridiculousfish
Copy link
Owner

Sorry for taking a while to get to this. Probably the simplest way to integrate this would be a new StartPredicate variant.

When analyzing the regex IR we can tell if matches must begin with a certain byte sequence; here's where that happens. Right now we only record the first 4 bytes, even if the prefix must be longer. We could have a variant that finds arbitrarily long byte sequences through Boyer-Moore.

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

2 participants