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

Re: Re: Re: Silly question about function args

by demerphq (Chancellor)
on Feb 09, 2003 at 10:10 UTC ( [id://233876]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Silly question about function args
in thread Silly question about function args

The fastest way to pass arguments is not to copy them at all

Exactly. Inline the function entirely. Thats much faster.

and to access them inplace in @_

Persoanlly I would caution against this. An innocuous change of

my $foo=shift; $foo=~s/A.//g; # to $_[0]=~s/A.//g;
Would alter the original variable. Better to do away with the subroutine entirely. Then at least this effect is obvious and as I said you avoid the subroutine jump overhead.

--- demerphq
my friends call me, usually because I'm late....

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (9)
As of 2024-04-23 10:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found