No such thing as a small change | |
PerlMonks |
Re^5: What perl operations will consume C stack space?by hv (Prior) |
on Feb 27, 2006 at 15:33 UTC ( [id://533039]=note: print w/replies, xml ) | Need Help?? |
Corion answers your second point; on the first point, refactoring to /(ab+|a)+/ reduces stack usage but does not eliminate it: for me, "a" x $n cores with /(ab*)+/ at n=10080 and with /(ab+|a)+/ at n=20157, so it appears to save exactly half of the stack usage. As TimToady mentioned, anything that quantifies "a compound submatch of varying length" will trigger it. (In fact even "compound" does not seem required, as /(a+?)+/ attests.) Hugo
In Section
Seekers of Perl Wisdom
|
|