foreach loops are really convenient, but are
for loops faster? It’s a simple question, but one that has really wide implications in almost any codebase. Today’s article tests them out to see which is faster for looping over arrays and
Lists. Read on to see which is quicker!
Posts Tagged loop
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.
AS3 has three kinds of loops—
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?
There’s more to AS3’s
continue statements than you might think. Chances are, you’ve used them to skip to after a loop (
break) and skip the current loop iteration (
continue), but they can do so much more. Today’s article will cover some of the advanced ways to use the
continue statements in AS3 resulting in nicer—and maybe even faster—code.