Descriptionregexp/syntax: don't waste time checking for one pass algorithm
The code recurs very deeply in cases like (?:x{1,1000}){1,1000}
Since if much time is spent checking whether one pass is possible, it's not
worth doing at all, a simple fix is proposed: Stop if the check takes too long.
To do this, we simply avoid machines with >1000 instructions.
Benchmarks show a percent or less change either way, effectively zero.
Fixes issue 7608.
Patch Set 1 #
Total comments: 1
Patch Set 2 : diff -r b9c40afbd66c https://code.google.com/p/go #Patch Set 3 : diff -r b9c40afbd66c https://code.google.com/p/go #
MessagesTotal messages: 9
|