Skip to content

<regex>: Consider special-casing some simple loop structures #5971

@muellerj2

Description

@muellerj2

Currently, loops like a* or \d* go through the whole NFA state transition processing for each repetition, which slows down the handling of such loops a lot.

I think it's probably worth it to recognize and special-case such simple and comonly used loop structures in the matcher. (But we should not add such special-case handling to non-simple loops and instead resolve #5957 to effectively extend the simple loop handling to branchless loops.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    performanceMust go fasterregexmeow is a substring of homeowner

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions