My guess is the former - for loop

On Thu, Apr 22, 2010 at 9:19 PM, Trevor Orr <[email protected]> wrote:

> I am working on a projects where there is a TON of array looping and
> performance is a priority.
>
> My question is what is going to be faster
>
> for(var x=0; x<somevar.length; x++) {
> myfunc(somevar[x]);
> }
>
> or
>
> somevar.each(function(item) {
> myfunc(item);
> });
>
>
>


-- 
---
"Make everything as simple as possible, but not simpler."

- Albert Einstein


-- 
Subscription settings: 
http://groups.google.com/group/mootools-users/subscribe?hl=en

Reply via email to