-
Notifications
You must be signed in to change notification settings - Fork 18.9k
regexp/syntax: character class negation is slow #69303
Copy link
Copy link
Open
Labels
FixPendingIssues that have a fix which has not yet been reviewed or submitted.Issues that have a fix which has not yet been reviewed or submitted.NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.Performance
Milestone
Metadata
Metadata
Assignees
Labels
FixPendingIssues that have a fix which has not yet been reviewed or submitted.Issues that have a fix which has not yet been reviewed or submitted.NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.Performance
I've submitted a benchmark and a fix at #69304.
New benchmark:
Go version
1.23 darwin/arm64
What did you do?
I received a report at VictoriaMetrics/VictoriaMetrics#6911 and ran a benchmark for
Regexp.String().What did you see happen?
Some regexes are extremely slow, even when they're simple. The negate
[^]causescalcFlagsto run over a large character space to find a fold case.