in reply to Re^2: Speed of Array Returns
in thread Speed of Array Returns
and got that call with reference is much faster:use Benchmark qw(cmpthese); my @array = (1..1000); cmpthese(-2, { call => sub { foo(@array); }, call_ref => sub { foo(\@array); }, }); sub foo { }
-- RomanRate call call_ref call 168822/s -- -93% call_ref 2575003/s 1425% --
|
|---|