You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While trying to implement a lexer, I noticed that RegexSet::matches exhibits very bad performance when used on long strings.
The following test case runs in 1 minute, 16 seconds (cargo build --release):
Without the line marked with // Delete me, the program runs in about 50 ms.
If I understand correctly, matches should try to match only at the very beginning of the string, thanks to the ^ anchor. However, it would seem that matches traverses the whole string on each call.