Help for this page

Select Code to Download


  1. or download this
    $string_out = foo($string_in);
    
  2. or download this
    use strict;
    use warnings;
    ...
        "fun2x$len" => sub { for (1 .. COUNT) { $tmp = fun2(\$str) } },
        });
    }
    
  3. or download this
    Benchmark: timing 10 iterations of fun1x1, fun2x1, in1x1, in2x1, out1x
    +1, out2x1...
        fun1x1:  4 wallclock secs ( 4.31 usr +  0.01 sys =  4.32 CPU) @  2
    +.31/s (n=10)
    ...
       in2x100:  1 wallclock secs ( 1.49 usr +  0.01 sys =  1.50 CPU) @  6
    +.67/s (n=10)
      out1x100: 43 wallclock secs (43.27 usr +  0.04 sys = 43.31 CPU) @  0
    +.23/s (n=10)
      out2x100:  2 wallclock secs ( 1.57 usr +  0.00 sys =  1.57 CPU) @  6
    +.37/s (n=10)