Archive for March, 2011

AS3 vs. JavaScript Performance Followup (March 2011)

It’s been about 9 months since my last test of AS3 versus JavaScript and there have been several major releases. I’ve held off on an update to this series since the two most widely used browsers—Internet Explorer and Firefox—have been approaching significant new versions. In the meantime, Adobe has released Flash Player 10.2 as we’ve seen in my performance update series (part one, part two, part three). Today, we pit every major browser against each other and Flash Player itself to get an updated idea of which provides the fastest scripting environment on the web.

Read the rest of this entry »

Tags: ,

6 Comments

Dynamic Field Access

AS3 has an interesting feature that is sometimes used to great effect: dynamic classes. These classes can have fields added and removed to them and used like any other field. You can even make your own dynamic classes with the dynamic keyword. However, all of this fancy functionality comes at a steep performance cost. How steep? Read on to see just how steep.

Read the rest of this entry »

Tags: , , , , , , , , ,

10 Comments

Local Variable Caching

Recently, I’ve seen a lot of performance-critical code that has made heavy use of field variables. For example, an expensive loop might look like this: for (var i:int = 0; i < this.numObjects; ++i). I've recommended to some of the programmers writing such code that they modify it to cache the field variable as a local variable to improve performance. Was I right to recommend this? In today's article I'll examine the read and write times to see if caching field variables locally really improves performance.

Read the rest of this entry »

Tags: , , ,

12 Comments

Operator Speed: Part 2

Today’s article is a followup to a flawed article I wrote last October. Skyboy’s comment brought this to my attention, so today I’m (hopefully) correcting the problems with an important test: AS3 operators. Read on for the updated test code and results.

Read the rest of this entry »

Tags: ,

11 Comments