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....