Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Shift versus Sanity

by phil_g (Initiate)
on Apr 24, 2002 at 15:47 UTC ( #161646=note: print w/replies, xml ) Need Help??


in reply to Shift versus Sanity

I think it's largely a stylistic choice. I tend to prefer my ($foo, $bar) = @_;. I did, at one point, do timing tests on @_ versus shift. For my test data (which consisted of object references and strings), I found that shift was generally faster for one and two parameters, both approaches were roughly the same for three parameters, and @_ was faster for more than three parameters.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (1)
As of 2021-10-18 23:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (76 votes). Check out past polls.

    Notices?