Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: What perl operations will consume C stack space?

by TimToady (Parson)
on Feb 25, 2006 at 10:16 UTC ( #532754=note: print w/ replies, xml ) Need Help??


in reply to What perl operations will consume C stack space?

I can think of two things. First, as mentioned above, is certain regex executions. In particular, ones that quantify a compound submatch of varying length. I believe these are still done with C recursion, though I haven't looked lately.

Second, calls into XS routines that then call back into Perl.

There are probably a few others (recursive sorts? recursive runloop switches?) but by and large part of the initial design of Perl 5 was to be as stackless as practical (in the C-stackless sense). So all of Perl's stacks are really on the heap, and nearly all of the standard opcodes leave the C stack in the same state.


Comment on Re: What perl operations will consume C stack space?
Re^2: What perl operations will consume C stack space?
by BrowserUk (Pope) on Feb 27, 2006 at 04:01 UTC

    Thankyou. This was extremely helpful.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://532754]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2015-07-06 00:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (68 votes), past polls