Prefix factoring in Optimize node produces wrong results #44
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
BeRo1985/flre#44
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Result: (37|2)
If you comment out Prefix factoring lines 14495-a4586 the
Result: (37|3|2)
Issue #10 is related to this
The suffix factoring works fine. You can leave it in.
Please test the new possible fix for it.
It does work.
37|3|2
is converted to:
(3(?:7|(?:))|2)
which is correct. Is the above as efficient as
(37?|2)
By the way have a look at https://pyscripter.blogspot.gr/2018/04/benchmark-of-regular-expression-engines.html
and
https://plus.google.com/u/0/104825163436199563872/posts/GHcoEQ9M1pD
Questiion:
In the above benchmark adding the rfONLYFASTOPTIMIZATIONS flag does not result in any degradation of speed. I guess this is because of the nature of the tested reg expressions. Is this the case?
Yes, right, but it depends also on the each-at-end-used subengines in FLRE, because some subengines don't care about so such optimizations in principle (for example the lazy-DFA-based), and some other subengines do care about it in turn.