Help for this page

Select Code to Download


  1. or download this
    # perl 5.10.0:
    timethis 10:  0 wallclock secs ( 0.33 usr +  0.00 sys =  0.33 CPU) @ 3
    +0.30/s (n=10)
                (warning: too few iterations for a reliable count)
    # perl 5.8.8:
    timethis 10: 79 wallclock secs (78.92 usr +  0.04 sys = 78.96 CPU) @  
    +0.13/s (n=10)
    
  2. or download this
    use strict;
    use warnings;
    ...
    use Benchmark qw(timethis);
    
    timethis(100_000, sub { $target =~ m/$re/ })