- or download this
open(IN, "bigfile.txt");
while(<IN>){
...
while(<IN>){
&big_sub2($_);
}
- or download this
open(IN, "bigfile.txt");
while(<IN>){
&big_sub1($_);
&big_sub2($_);
}
- or download this
use Benchmark;
...
my $codehash = {'sub1' => \&sub1,'sub2' => \&sub2,'sub3' => \&sub3};
timethese(5000000, $codehash);
- or download this
sub1: 13 wallclock secs (12.80 CPU)
sub2: 8 wallclock secs (8.24 CPU)
sub3: 6 wallclock secs (6.66 CPU)