Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Re^4: Number of times I've used goto in Perl

by Eily (Monsignor)
on Sep 26, 2018 at 15:04 UTC ( #1223073=note: print w/replies, xml ) Need Help??

in reply to Re^3: Number of times I've used goto in Perl
in thread Number of times I've used goto in Perl

I'm pretty sure there was a detailed explanation of what makes goto slower (in most cases?) than a plain ⊂ call. But while searching for it I did end up finding this post and this answer. I would be tempted to guess that the function call with goto was more expensive (because of the extra magic to clear the local scope and play with the call stack), but the return was more efficient because it didn't require going back through all the calling stack (ie, tail recursion done right). I wouldn't rely on the result of benchmarks from 2005 for current versions of perl though :P

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2019-10-21 05:13 GMT
Find Nodes?
    Voting Booth?