All posts tagged while

Nice AS3 Performance tester (loops, arrays, division, instantiations, constants, …)

When you look for something, there are always more chances that you don’t find it when you need it. It’s only weeks later, when looking for something else that you step on it. (some unwritten laws that I know most of you have encountered many times) Anyway, here is a great open-source performance tester written […]

AS3 loops performance benchmarking

I just went through a post from polygonal labs that shows the difference in performance between several loops in AS3. If you go have a look at his post, you’ll see that the “for (i = 0; i < n; i++) {}” loop wins the first place. I have set up a benchmarking tool just […]

The continue statement and labels

The continue statement skips the rest of the code inside a loop and starts at the beginning of this loop as if the end of the loop had been reached normally. Thus, the code after the continue statement in the code below will never get executed by flash: [sourcecode language=’cpp’] for(var i:int = 0 ; […]

Break statement and labels

The break statement allows us to skip the execution of a loop or statement: [sourcecode language=’cpp’] for(var i:int = 0 ; i < 10 ; i++) { if ( i >= 5 ) { break; } } [/sourcecode] Simple. Now imagine we have a loop nested in another loop: [sourcecode language=’cpp’] for(var i:int = 0 […]