- or download this
use strict;
use warnings;
use Benchmark ();
- or download this
sub test_arr { my @arr = @_; $a = join('|', @arr); }
sub test_ref { my @arr = @{$_[0]}; $a = join('|', @arr); }
sub test_ref2 { $a = join('|', @_); }
- or download this
{
my @tiny = qw( abc def ghi );
...
__END__
output
======
- or download this
TINY ARRAY
...
ref 850/s -- -0% -99%
arr 850/s 0% -- -99%
ref2 148539/s 17383% 17381% --