Posts Tagged for-in

5x Faster For-In Loops

Tags: , , ,

I’ve recently been notified of a way to dramatically speed up for-in loops. I’ve tested this method out and indeed there is a 5x speedup. Employing the technique is also really easy. Unfortunately, the speedup is sometimes an illusion. Read on to learn a little more about for-in loops and how you could potentially speed yours up by 5x.

Read the rest of this article »

9 Comments

Loop Speed Redux

Tags: , , , , , , , , , ,

AS3 has three kinds of loops—for, for-in, and for-each—but which is fastest? I attempted to answer that question about three years ago, but the article is in dire need of a followup as many version of Flash Player have been released since then and the question is core to our everyday lives as AS3 programmers. So which type of loop is fastest in 2012?

Read the rest of this article »

15 Comments

Proxy Performance

Tags: , , , , , ,

The Flash API has a gem of a class in Proxy. You can use it to customize the behavior of the dot (.), index ([]), delete, and in operators as well as the for-in and for-each-in loops. Today’s article answers a recent comment by exploring the performance implications of all this fancy customizing that Proxy allows.

Read the rest of this article »

2 Comments