Help for this page

Select Code to Download


  1. or download this
    sub foo
    {
    ...
    }
    
    my $num_foo = foo( @args );
    
  2. or download this
    my @x = 1 .. 1_000_000;
    sub want { return wantarray ? @x : $#x + 1; }
    ...
    4want_list     1.13/s           2%           --        -100%        -1
    +00%
    2want        578238/s    52234049%    51366692%           --          
    +-1%
    1nowant      582571/s    52625456%    51751600%           1%          
    + --
    
  3. or download this
    Benchmark: running 1nowant, 2want, 3nowant_list, 4want_list for at lea
    +st 10 CPU seconds...
       1nowant: 13 wallclock secs (10.67 usr +  0.00 sys = 10.67 CPU) @ 55
    +8715.46/s (n=5961494)
    ...
    4want_list     1.12/s           0%           --        -100%        -1
    +00%
    2want        390888/s    35016924%    34919202%           --         -
    +30%
    1nowant      558715/s    50051494%    49911815%          43%          
    + --