-
Notifications
You must be signed in to change notification settings - Fork 462
do simple literal prefix scanning in regex! #95
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
Comments
Okay, seems the real problem is in If that means there's nothing to fix in this crate - feel free to close this, I'll refile the issue where appropriate. |
One of the major optimizations for dynamic regexes is in how it handles literal prefixes. Unfortunately, the added complexity of that makes it a little tricky to get it into the |
@mkpankov Thank you for noticing this and reporting it! |
BTW, regarding the literal prefix matching, are you using tricks like https://github.com/shepmaster/jetscii ( |
|
That might shift the performance scales in favour of |
FYI jetscii is limited to ascii at the moment but it could just as well be implemented to look for any byte values. |
Perhaps of interest, jetscii 0.3.0 introduces support for finding substrings:
|
Out of curiosity, what is the status of this year-and-a-half old bug? |
@JoeyAcc I have zero plans to work on the |
Closing in favor of #26. |
Hi,
I saw the news of that
regex
got refactored and optimized and decided to check my old benchmark. I was very surprised it now runs twice as long!How to reproduce (using
multirust
for versions as olderregex
doesn't compile with newer nightly Rust):I'm sorry I can't pinpoint it more accurately (maybe it's Rust changes, not
regex
), but recent major changes ofregex
might be it. Two times degradation is severe in my opinion, and needs action.regex
versions:Some background: back when I did this I compared Rust version to C++ version (doing almost stupid translation) and Rust beat C++ by about 40% w/o using compile-time regex. This kind of degradation puts it back behind C++ 😞
The text was updated successfully, but these errors were encountered: