Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -w
    use Benchmark qw(cmpthese);
    ...
            single => sub { $foo = 'foo'},
            double => sub { $foo = "foo"}
            });
    
  2. or download this
    [jon@valium jon]$ ./test.pl 
    Benchmark: timing 10000000 iterations of double, single...
    ...
                Rate double single
    double 5235602/s     --   -35%
    single 8000000/s    53%     --