-
Notifications
You must be signed in to change notification settings - Fork 6
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
Regex construction: optimizations #134
Conversation
|
Particular impact on regex benchmarks
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks really great! Do you know why we get TO for those few benchmarks in redos
?
// bound for loop (above this number an optimized construction is used) | ||
const unsigned LOOP_BOUND = 5000; | ||
// simulation reduction bound in states (bigger automata are not reduced) | ||
const unsigned RED_BOUND = 1000; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you try also different values?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No
It seems that it is caused by a combination of a big base NFA and a large number of repetitions inside |
Ok, we can merge then. |
This PR optimizes working with regexes:
re.loop