Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

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

by ruzam (Curate)
on Oct 05, 2012 at 14:28 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://997485]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2024-04-16 17:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found