Xavier Noria wrote:
This is kind of a holy war. Some people have that point of view, some don't. All depends on the way you read map. The disagreement is such that recently map was optimized in void context to avoid the generation of the list.

As always, Benchmark.pm is your friend for speed comparisons. Memory is no longer misused with map in void context, so make a choice according to your personal preferences.

Write the code like you are going to lose your memory in six months. Which is more effective? The method you are most likely to remember when you have to maintain the code.

BTW, only optimize your code if your manager says it's too slow. Understanding what you wrote is more important than speed.

--

Just my 0.00000002 million dollars worth,
   --- Shawn

"Probability is now one. Any problems that are left are your own."
   SS Heart of Gold, _The Hitchhiker's Guide to the Galaxy_

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to