Skip to content

Optimize regex matching for finding non-global matches #117

@LinqLover

Description

@LinqLover

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 :-)

Metadata

Metadata

Assignees

No one assigned

    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.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions