- or download this
my $self = shift;
my %param = @_;
- or download this
my ($self,%param) = @_;
- or download this
use Benchmark qw(cmpthese);
cmpthese( -2,{
...
5.6.2 Rate list shiftit
list 94936/s -- -68%
shiftit 297717/s 214% --
- or download this
sub list { my ($self,%param) = @_ }
sub shiftit { my $self = shift; my %param = @_ }
...
5.6.2 Rate shiftit list
shiftit 89341/s -- -10%
list 98866/s 11% --
- or download this
cmpthese( -2,{
list => sub { list( qw(foo) ) },
...
5.6.2 Rate shiftit list
shiftit 179408/s -- -12%
list 203990/s 14% --
- or download this
cmpthese( -2,{
list => sub { list() },
...
5.6.2 Rate shiftit list
shiftit 212031/s -- -14%
list 246447/s 16% --
- or download this
To call subroutines:
...
NAME LIST; # Parentheses optional if predeclared/import
+ed.
&NAME(LIST); # Circumvent prototypes.
&NAME; # Makes current @_ visible to called subrout
+ine.
- or download this
cmpthese( -2,{
list => sub { &list },
...
5.6.2 Rate list shiftit
list 135814/s -- -61%
shiftit 343986/s 153% --