Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -w
    
    ...
    }
    
    timethese (100, {'whichone' => \&which1, 'whichtwo' => \&which2});
    
  2. or download this
    [10:27:15 jhorner@gateway scripts]$ ./ch0as-1.pl test.txt
    Benchmark: timing 100 iterations of whichone, whichtwo...
      whichone:  0 wallclock secs ( 0.01 usr +  0.02 sys =  0.03 CPU) @ 33
    +33.33/s (n=100)
                (warning: too few iterations for a reliable count)
      whichtwo: 14 wallclock secs (12.54 usr +  1.55 sys = 14.09 CPU) @  7
    +.10/s (n=100)