regexp/syntax: character class negation is slow #69303
Labels
FixPending
Issues that have a fix which has not yet been reviewed or submitted.
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Performance
Milestone
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
[^]
causescalcFlags
to run over a large character space to find a fold case.The text was updated successfully, but these errors were encountered: