- or download this
use Benchmark;
my $code = '';
...
print "\n...Testing...\n";
timethis($runs, &$func);
}
- or download this
sub manic {
my $x = 0;
...
print $x;
}
- or download this
:)~> perl bmark.pl
Enter number of code runs:
...
...Testing...
51timethis 2000: 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU)
(warning: too few iterations for a reliable count)