Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Map vs foreach?

Status
Not open for further replies.

Haunter

Programmer
Jan 2, 2001
379
US
I suppose this is strictly a acedemic question but has anyone benchmarched map vs foreach on a large array?

I recently used map with the sorting functions of perl and found it to be very condense code to do a common task.

Any thoughts?


haunter@battlestrata.com
 
Test it for yourself!
I have found from experience that questions like this can be platform specific so it's usually best to test it for yourself on the target platform.

perl -d:DProf mycode.pl
dprofpp -u

Trojan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top