Dear Michael,
I am wrong. [SHAME]
The output of Benchmark is slowest first... whereas I intuitively
thought it would be fastest first. All my conclusions are therefore
wrong, although the differences in speed are still surprising.
Results may change depending on the version of Perl, I am using 5.8.3.
Working in the correct direction (I.E. make it faster), I find:
Sixth => sub {
my $max_length = 0;
for (keys %data) {
if (length > $max_length) {
$max_length = length;
}
}
}
Gives a slight speed increase over "First".
Jonathan Paton
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>