in reply to Re^4: What perl operations will consume C stack space?
in thread What perl operations will consume C stack space?
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: What perl operations will consume C stack space?
by BrowserUk (Patriarch) on Feb 27, 2006 at 17:22 UTC | |
by hv (Prior) on Feb 27, 2006 at 18:53 UTC | |
by BrowserUk (Patriarch) on Feb 27, 2006 at 20:43 UTC |