XP is just a number | |
PerlMonks |
Re: map versus forby actualize (Monk) |
on Aug 04, 2008 at 17:13 UTC ( [id://702124]=note: print w/replies, xml ) | Need Help?? |
The speed increase involves minimizing resource intensive tasks such as sorting. Instead of of running code every time you iterate over a loop, you perform a map on the data once storing the output into an array. Then you can use the information from the array. The classic example would be the Schwarzian transform .
-Actualize
In Section
Seekers of Perl Wisdom
|
|