in reply to file handling or hash is efficient
although, its advisable to run the same code several times, (say a few hundred times ) and then average out the time to get a better estimate of how long the piece of code takes. This can be done directly with the module as well, and is explained in the docs.use strict; use Benchmark; my $t0 = new Benchmark; # ... your code here ... my $t1 = new Benchmark; my $td = timediff($t1, $t0); print "the code took:",timestr($td),"\n";
perliff
----------------------
-with perl on my side
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
| A reply falls below the community's threshold of quality. You may see it by logging in. |