Perl optimizes certain nested loop regex constructs similar to (...*)* in order to avoid what is pathological behavior with most regex engines. For non-pathological cases, there is a small cost to this protection.
The reason the performance significantly decreases is because that crosses the point that triggers the warning "Complex regular subexpression recursion limit (32766) exceeded" (repeatedly).
- tye
In reply to Re: Strange behaviour of the regex engine (pathological protection)
by tye
in thread Strange behaviour of the regex engine
by thof
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |