AS3 vs. JavaScript Performance Followup (November 2011)
It’s been about 8 months since my last test of AS3 versus JavaScript and there have been several major releases of both browsers and the Flash Player. Today, we pit every major browser against each other and Flash Player itself to get an updated picture of which provides the fastest scripting environment on the web.
Since last time, the following releases have occurred:
Platform | Last Test | Today’s Test |
---|---|---|
Flash Player | 10.2.154.25 | 11.1.102.55 |
Opera | 11.01 | 11.52 |
Safari | 5.0.4 | 5.1.1 |
Chrome | 10.0.648.204 | 15.0.874.120 |
Firefox | 4.0.0 | 8.0.0.4325 |
Only Internet Explorer was not updated this time as its version number remains exactly the same: 9.0.8112.16521.
I performed all of these tests in the same environment as last time except for the version of the Flex SDK used:
- Flex SDK (MXMLC) 4.5.1.21328, compiling in release mode (no debugging or verbose stack traces)
- 2.8 Ghz Intel Xeon W3530
- Windows 7
I assign “points” to each platform based on its performance ranking on each test. There are six platforms in this test, so the first place platform gets six points, the second platform gets five points, and so on. Say there is a three-way tie for first place. In that case, each tying platform gets six points and the next-best platform gets three points, the platform after it gets two points, and the last place platform gets one point.
Here are the points awarded:
Platform | JavaScript (Firefox 8.0.0.4325) | JavaScript (IE 9.0.8112.16421) | JavaScript (Chrome 15.0.874.120) | JavaScript (Safari 5.1.1) | JavaScript (Opera 11.52) | AS3 (Flash 11.1.102.55) |
---|---|---|---|---|---|---|
Test 1 | 3 | 4 | 6 | 5 | 3 | 1 |
Test 2 | 6 | 4 | 1 | 2 | 5 | 3 |
Test 3 | 2 | 1 | 4 | 3 | 5 | 6 |
Test 4 | 2 | 1 | 4 | 3 | 5 | 6 |
Test 5 | 6 | 4 | 4 | 1 | 4 | 6 |
Test 6 | 6 | 6 | 2 | 1 | 6 | 6 |
Test 7 | 4 | 2 | 6 | 5 | 1 | 3 |
Test 8 | 3 | 4 | 5 | 2 | 1 | 6 |
Test 9 | 1 | 6 | 5 | 3 | 2 | 4 |
Test 10 | 5 | 5 | 6 | 2 | 1 | 3 |
Test 11 | 4 | 1 | 6 | 2 | 5 | 3 |
Test 12 | 6 | 2 | 4 | 2 | 4 | 6 |
Total | 48 | 40 | 53 | 31 | 42 | 53 |
To compare these results to the results from March 2011, let’s look at how each platform’s points changed:
Product | Last Test | Today’s Test |
---|---|---|
Flash Player | 54 | 53 |
Opera | 44 | 42 |
Safari | 34 | 31 |
Chrome | 44 | 53 |
Internet Explorer | 45 | 40 |
Firefox | 46 | 48 |
Google Chrome is the big winner here as it jumped from 44 points to 53. Firefox made a marginal gain of two points to go from 46 to 48 points. Both of these gains were at the expense of all the other platforms, which all lost ground. Of these, Flash Player fared the best by only slipping from 54 to 53 points and Internet Explorer, the only platform to not update during this cycle, fared the worst by dropping from 45 to 40 points.
Overall, Flash Player and Google Chrome are now tied for first place by a solid margin over second-place Firefox, which I’ll call the top tier of speed. Making up the second tier of speed is Internet Explorer and Opera. Alone in the third tier is the slowest by a wide margin: Safari.
As usual, the above test is only a simple test suite from oddhammer.com and not a comprehensive test of all features under all conditions. As such, I recommend viewing the above results only as a broad perspective on overall performance. For specific performance characteristics, check out the other AS3 and JavaScript articles on this site and stay tuned for plenty more!
Raw data spreadsheets: Open Document Format (ODS) , Excel (XLS).
Spot a bug? Have a suggestion? Post a comment!
#1 by AlexG on November 15th, 2011 ·
So this means that AS3.0 is now faster than JavaScript?
#2 by jackson on November 15th, 2011 ·
Actually, it’s a tie with Chrome 15 this time, but Flash Player 10.1 was fastest in March. However, this is only one test suite on one machine with one scoring scheme so please take the results with a pinch of salt. For example, by raw total times across all the tests in the suite, Firefox 8 is the fastest platform. I’ve just chosen to weight the tests according to a point scheme that happens to result in a tie between Chrome 15 and Flash Player 11.1.
#3 by AlexG on November 30th, 2011 ·
Flash Player 11 shows significant improvement on performance. I think in 2 month 85% of users will have FP11 installed, so its better to make tests on FP 11 now. And compare them with tests of FP 10
#4 by Antti H. on November 20th, 2011 ·
This is only scripting benchmark, right? As such tells nothing about multimedia performance which may be more relevant to real life apps.
To my experience Flash Player beats browsers in graphics and video rendering by large margin. Now with Flash 11 and Stage3D even more so.
#5 by jackson on November 20th, 2011 ·
Yep, that’s why it’s titled “AS3 vs. JavaScript Performance” and not “Flash vs. HTML5”. So this is just a test to show how fast code executes in each environment and as such is just a piece of the puzzle. You’re definitely right that multimedia performance is very important too, so there are and will be more tests for that subject. :)
#6 by Kevin Newman on November 20th, 2011 ·
It would be interesting to see how Flash’s iOS AOT compiler holds up (though I guess it would be hard to test the other browsers on the same hardware). :-)
#7 by Edmundo on November 30th, 2011 ·
Jackson, I’m curious (and probably others) about how JavaScript performs through ExternalInterface calls in Flash Player 10.3/11 and in different browers. Is it possible that you could post about that test? :)
#8 by jackson on November 30th, 2011 ·
It’s an interesting idea. I would guess that there’s overhead for the ExternalInterface call, but then the JavaScript would run at full speed after the function is called. So the performance would be terrible for tiny functions but pretty good for large functions. To exploit this, see my article .