> is only noticeable when you're doing 50,000+ loops of non-trivial code.

When you're doing 50,000+ loops of non-trivial code, I don't think
it's performance of the loop you have to worry about. :)

Here's something about performance:
<http://blogs.sun.com/chrisoliver/entry/hotspot_vs_adobe_tamarin_vm>
(Note the comments)

With the haXe version posted by BlackDog on the haXe list, I'm getting:
Flash 8: 12min 33s (only ten repetitions, extrapolated to 100)
Flash 9: 15s
Neko: 17.5s
(Java version from the blog post: 3s)

That's just /one/ benchmark, but it should give you an idea about how
much faster the new VM is compared to the old one.

Mark


On 7/27/07, Steven Sacks <[EMAIL PROTECTED]> wrote:
> 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
>
_______________________________________________
[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