in reply to Re(4): my $var; vs. use constant VAR = '';
in thread my $var = ''; vs. use constant VAR => '';
Ahhhh -- but run that again. New values. Perils of Benchmark {grin}. On our system here (6 to 7 developers per box) the load changes enough that even a "stable" test will show different outputs.
Something that would be nice for benchmark to do is to randomize the order in which the tests are run -- pick one of the keys randomly each time. This would probably make the percentages a little bit more constant.
Still though, kind of funny that things are in the ball park of a literal value.
my @a=qw(random brilliant braindead); print $a[rand(@a)];
Something that would be nice for benchmark to do is to randomize the order in which the tests are run -- pick one of the keys randomly each time. This would probably make the percentages a little bit more constant.
Still though, kind of funny that things are in the ball park of a literal value.
my @a=qw(random brilliant braindead); print $a[rand(@a)];
In Section
Seekers of Perl Wisdom