On 7/25/06, Mark Winterhalder <[EMAIL PROTECTED]> wrote:
This seems to be extreme. Any chance something is going wrong with the test? Did you wait a few frames before doing the first test to ensure initialization has finished? Maybe switch the order to see if the first one always is the slowest? Frankly, I only had a quick look at yours, but it seemed to follow roughly the same principle as mine. So where is the bottleneck (if the test works correctly)?
OK, had a (slightly) closer look after all. Avoid the Array.length property. Avoid properties in general (I have some, too, but only when the algorithm comes across another array). Also, while generally is faster than for(;;) for loops, especially in the while( i-- ) form (fastest loop possible when going through an array, but not usable in this case). Mark _______________________________________________ [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

