AS3 vs. JavaScript Performance Followup (March 2010)
Version 10.5 of Opera was released today. Opera 10.0 last performance test made some small strides over 9.64, but it was still the slowest current version of the browser out of the whole test. Also, Google Chrome was updated on January 25th and Mozilla released Firefox 3.6 on January 21st. Today’s article shows an updated performance comparison to check up on the progress being made by Opera, Google, and Mozilla.
Let’s look at the performance charts:
All Versions
Current Versions
Sadly, Google Chrome has lost a bit of its performance with the release of version 4.0. Opera, however, has made tremendous strides in 10.5! The test data shows Opera 10.5 with a speedup of 465% over version 10.0! It’s now so fast that it is edging out Safari 4 by a small margin. But even with this huge gain, Mozilla’s release of Firefox 3.6 still manages to claim the performance crown. Here are the new rankings:
- Mozilla Firefox 3.6 (fastest)
- Opera 10.5
- Safari 4.0
- Flash 10.0
- Chrome 4.0
- Internet Explorer 8.0 (slowest)
Hopefully I will have Flash Player 10.1 available to test for the next installment of this series. Until then, enjoy the raw data as Open Document Format (ODS) or Excel (XLS) format spreadsheet.
#1 by Mario Klingemann on March 4th, 2010 ·
That’s some very interesting info – thanks! But I had a look at the ActionScript test code (I assume you use the one by Ted Patrick here: http://www.onflex.org/perf/srcview/ ) and it seems like all the tests are still using Arrays. In a real world situation AS3 developers would use the new Vector class for these kinds of operations so I think this test does not correctly reflect the possible speed AS3 could achieve.
#2 by jackson on March 4th, 2010 ·
Yes, that is the test I’m using. You can find a link in the spreadsheets and the original test, but I stopped adding it to the followup articles.
I converted the test to use Vector instead of Array just now and found the following results:
So Vector doesn’t seem to help AS3/Flash Player’s performance overall.
#3 by Mario Klingemann on March 10th, 2010 ·
Very interesting results. Good that I did not bet any money on that I would have sworn that Vectors make it faster.
#4 by Rezmason on March 4th, 2010 ·
Yes, please make sure you use typed AS3 Vectors instead of Arrays in the performance test. Even if a SWF does not contain user-written ActionScript, Vectors are still used internally by the player.
Also, for what it’s worth I hear (i += 1) is faster than (i++) in ActionScript.
#5 by jackson on March 4th, 2010 ·
Tomorrow’s article will be on the subject of different increment and decrement strategies.