in reply to (map vs. for) optimizing code - need help
in thread optimizing code - need help
However the slow-down you wondered at with 500 elements is the effect of the quadratic slowdown in my note. The problem is that the entire argument stack was getting moved for each call of the block. The first time that takes work n. The second n-1. The third n-2. etc. So it is quadratic.
If you are willing to recompile Perl, there is a very simple patch available.
|
|---|