Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    
    use Benchmark 'cmpthese';
    ...
            goto => sub { $foo->foo_goto(@foo=@stuff) },
            my   => sub { $foo->foo_my(@foo=@stuff) },
    });
    
  2. or download this
    Benchmark: timing 5000 iterations of goto, my, pipe...
          goto:  3 wallclock secs ( 2.96 usr +  0.00 sys =  2.96 CPU) @ 16
    +89.19/s (n=5000)
    ...
    my   1567/s   --  -7%  -9%
    goto 1689/s   8%   --  -2%
    pipe 1730/s  10%   2%   --