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

Optimize regex matching for finding non-global matches #117

Open
LinqLover opened this issue Feb 23, 2024 · 0 comments
Open

Optimize regex matching for finding non-global matches #117

LinqLover opened this issue Feb 23, 2024 · 0 comments
Labels
challenging [RATING] This issue entails technical or design challenges such as a big and unclear scope. tools and libraries [SCOPE] From #asTextToHtml over JSON parsing to Debugger and Browser.

Comments

@LinqLover
Copy link
Contributor

matchesRegex: '.*...' should be as fast as RxMatcher>>search:, but is currently significantly slower:

longString := String new: 10000 withAll: $x.
longString matchesRegex: '.*y'.
'y' asRegex search: longString.

Can RxMatchOptimizer handle this?

Related issues:

  • search: is pretty inefficient, maybe it could utilize something like findSubstring:
  • analogously, in the other direction, lookbehind matching is very inefficient and could benefit from a "backwards matching" mode ... so many construction sites :-)
@LinqLover LinqLover added challenging [RATING] This issue entails technical or design challenges such as a big and unclear scope. tools and libraries [SCOPE] From #asTextToHtml over JSON parsing to Debugger and Browser. labels Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
challenging [RATING] This issue entails technical or design challenges such as a big and unclear scope. tools and libraries [SCOPE] From #asTextToHtml over JSON parsing to Debugger and Browser.
Projects
None yet
Development

No branches or pull requests

1 participant