regexp: optimize for provably too long inputs #33484
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Performance
Milestone
As a complement to #31329, we should find out what the maximum length of matchable inputs is at compile-time (when it exists) and return very early.
Some patterns for which this can be computed:
^a{2,5}$
(max length 5)^((aaa)|(aa))$
(max length 3)^.$
(max lengthutf8.UTFMax
=4)The text was updated successfully, but these errors were encountered: