in reply to Re^2: What perl operations will consume C stack space?
in thread What perl operations will consume C stack space?
Sorry, I can't answer that without fuller definitions of "legitimate" and "cannot be better expressed" - which does my previous example fall foul of?
Any pattern that repeats a "non-simple" expression will consume C-stack space on each repetition. At least 3 of the 4 bugs linked to the metabug #24274 arose from people solving real world tasks, and there are more in the bugs database that should also be linked to the metabug - more recent ones often involve searching for particular structures in a genome.
Here's another common fragment that invokes the problem:
though it consumes stack at only half the rate of the /(ab*)*/ variety.$_ = sprintf q{"%s"}, "a" x 32768; /"((?:\\.|[^"])+)"/;
Hugo
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: What perl operations will consume C stack space?
by BrowserUk (Patriarch) on Feb 27, 2006 at 14:08 UTC | |
by Corion (Patriarch) on Feb 27, 2006 at 14:18 UTC | |
by hv (Prior) on Feb 27, 2006 at 15:33 UTC | |
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 |