>>>>> "Hanson," == Hanson, Robert <[EMAIL PROTECTED]> writes:

Hanson,> Ahhh, I see.  So this would work as well.
Hanson,> map {s/foo/bar/} @data;

Eeek.  A map in void context!  Please don't do that.

Hanson,> ...But the "for" seems to be a little bit faster which makes sense.

Hanson,> Benchmark: timing 1000000 iterations of FOR, MAP...
Hanson,>  FOR: 16 wallclock secs (15.84 usr +  0.00 sys = 15.84 CPU) @ 63119.36/s
Hanson,> (n=1000000)
Hanson,>  MAP: 19 wallclock secs (18.87 usr +  0.00 sys = 18.87 CPU) @ 52982.94/s
Hanson,> (n=1000000)

And that's why.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to