Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^6: Efficiency of map vs. more verbose basic/fundamental code

by ruzam (Curate)
on Oct 05, 2012 at 14:28 UTC ( #997485=note: print w/ replies, xml ) Need Help??


in reply to Re^5: Efficiency of map vs. more verbose basic/fundamental code
in thread Efficiency of map vs. more verbose basic/fundamental code

Thanks for that catch remiah. ++

I switched the benchmark methods from 'timethese' to 'cmpthese' at the same time that I fixed the test function calls, and then simply had a brain fart when I looked at the results. I've edited my post accordingly.

Using foreach is faster than map in this example. My faith is restored (whew!).


Comment on Re^6: Efficiency of map vs. more verbose basic/fundamental code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://997485]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (6)
As of 2014-11-01 06:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (228 votes), past polls