First off, thanks to everyone helping on this thread.  I originally was
using "object" == typeof(this[a]).  Glad to see instanceof Array was
fastest.

What I'm trying to do here is write new methods for Array (and next up
is String) that other languages have but Flash does not.  Some of these
methods are extremely useful.  This is why I'm injecting them right into
Array with prototype for now.  This is also why I'm trying to squeeze
the absolute fastest performance out of these methods.

The fastest loop in flash is not while (i--).  Pre-decrementing is
faster than Post-decrementing.  while (--i -(-1)) is actually the
fastest because of what it compiles to in bytecode.  For more
information on this and other cool optimizations, check out the Flasm
page.

One thing I'm wondering is if a decrementing loop and then a reverse()
at the end is faster than an incrementing loop.

I'm working on compacting Danny's script at the moment.

-Steven


_______________________________________________
Flashcoders@chattyfig.figleaf.com
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