Skip to content

[NFC] Non-recursive wildcard matching#7988

Merged
tlively merged 4 commits into
mainfrom
single-push-wildcard-match
Oct 23, 2025
Merged

[NFC] Non-recursive wildcard matching#7988
tlively merged 4 commits into
mainfrom
single-push-wildcard-match

Conversation

@tlively
Copy link
Copy Markdown
Member

@tlively tlively commented Oct 23, 2025

Implement a non-recursive wildcard matching algorithm that pushes and pops the search stack as little as possible. It pushes only when it must decide whether or not to have a wildcard consume a character that it could also plausibly not consume.

Implement a non-recursive wildcard matching algorithm that pushes and
pops the search stack as little as possible. It pushes only when it
must decide whether or not to have a wildcard consume a character that
it could also plausibly not consume.
@tlively
Copy link
Copy Markdown
Member Author

tlively commented Oct 23, 2025

(The last commit makes this simpler but possibly way slower, so it's mostly just to illustrate how simple this can get.)

Copy link
Copy Markdown
Member

@kripken kripken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, both solutions seem fine and this one may be faster.

Please copy the test from the other PR.

@tlively tlively marked this pull request as ready for review October 23, 2025 16:53
@tlively tlively enabled auto-merge (squash) October 23, 2025 16:53
@tlively tlively merged commit 051f392 into main Oct 23, 2025
16 checks passed
@tlively tlively deleted the single-push-wildcard-match branch October 23, 2025 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants