FLASM: http://flasm.sourceforge.net/#optimization
When it comes to optimizing, there are a few key things to remember:
1) Subtraction is faster than addition
2) Decrementation is faster than incremenations
3) Pre-decrementation is faster than post-decrementation
By faster, it means there is less bytecode to run.
The fastest loops in AS1 and AS2 are:
var i:Number = len;
while (--i -(-1))
{
// faster
}
and
do
{
// fastest (in theory)
} while (--i -(-1))
However, the difference between those and
var i:Number = len;
while (i--)
{
// stuff
}
is only noticeable when you're doing 50,000+ loops of non-trivial code.
Keep in mind do...while runs at least once.
_______________________________________________
[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