Eh?
use Benchmark; @a = qw(the quick brown fox jumps over the lazy dog); timethese(1000000, { 'for' => '$_ = lc for @a', 'map' => '@a = map lc, @a', }); $ perl580 /tmp/p Benchmark: timing 1000000 iterations of for, map... for: 20 wallclock secs (19.28 usr + 0.02 sys = 19.30 CPU) @ 51 +813.47/s (n=1000000) map: 47 wallclock secs (47.85 usr + 0.02 sys = 47.87 CPU) @ 20 +889.91/s (n=1000000)
In reply to Re: Re: Re: lc entire contents of array?
by dave_the_m
in thread lc entire contents of array?
by McMahon
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |