That is a very interesting page. So apparently this method is the fastest
when do a lot of looping. At least on my machine. By looking at the
function I would never have thought that possible but that is what that
benchmark page shows.
function kentaromiuraFastestDevice(iterations) {
var testVal=iterations;
if(parseInt(iterations/8)){
var n=iterations%8;
do{
--testVal; //do stuff
--testVal; //do stuff
--testVal; //do stuff
--testVal; //do stuff
--testVal; //do stuff
--testVal; //do stuff
--testVal; //do stuff
--testVal; //do stuff
}while(testVal!=n);
}
while(testVal--){
//do stuff
}
}
On Thu, Apr 22, 2010 at 11:59 AM, eskimoblood <[email protected]> wrote:
> WebReflection has a complete test page for all the different
> approaches to loop over an array:
> http://devpro.it/examples/loopsbench/
>
> But keep in mind: premature optimization is the root of all evil
>
>
> --
> Subscription settings:
> http://groups.google.com/group/mootools-users/subscribe?hl=en
>