I think you have to keep the Flash player version in mind as well.
Those tests and what lead to the awkward notation --> while (--i -(-1))
were done quite some time ago.

Which each new flash player version, performance improves, so what once was 
true (one being slower than the other), may no longer be 
the case.

regards,
Muzak

----- Original Message ----- 
From: "Tyler Wright" <[EMAIL PROTECTED]>
To: "Flashcoders mailing list" <[email protected]>
Sent: Tuesday, September 19, 2006 10:35 PM
Subject: Re: [Flashcoders] Find item in array


> :)
>
> So, for the sake of another one of those big arguments over what's better
> where no one ever test, I wrote some code to find out exact results:
>
> The following code executes one particular test on my Windows XP machine.
> For results I got an averate of 347 miliseconds executeing the --i -(-1) and
> 343 ms with the for..in loop. I was surprised at how close they were. Now
> that being the difference over 10,000 iterations, I can't really say for..in
> is much faster, if at all. Perhaps the results are different on someone
> else's machine, or perhaps different results from a different type of array.
> Now iterating through the entire array the for..in did seem to be faster,
> but for the test I chose a value directly in the middle so each method had
> the same amount of value's to cover. anyway, I conclude nothing. ;)
>
> except that we should always test our results.
>
> Tyler
>


_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to