Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

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?
Replies are listed 'Best First'.
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?

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (9)
As of 2015-11-25 18:19 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (684 votes), past polls