Help for this page

Select Code to Download


  1. or download this
    Benchmark: timing 1000000 iterations of method1, method2, method3...
       method1: 71 wallclock secs (69.22 usr +  0.13 sys = 69.35 CPU) @ 14
    +419.61/s (n=1000000)
       method2: 39 wallclock secs (39.21 usr +  0.00 sys = 39.21 CPU) @ 25
    +503.70/s (n=1000000)
       method3: 100 wallclock secs (96.76 usr +  0.13 sys = 96.89 CPU) @ 1
    +0320.98/s (n=1000000)
    
  2. or download this
    #!/usr/bin/perl
     use strict;
    ...
       method3 => sub { foreach (@test) {method3($_,'a')}},
       }
       );