« The Launch of Flex 2 And Beyond | Main | Incremental Compilation from the Command-line »

Updated performance tests for Flex and Flash Player 9

I saw a question about performance tests today, and so I looked around a found a nice set of performance tests by Mike Lyda. Performance numbers comparing Javascript and Flash Player 7/8/8.5 can be found here.

Curious to see the latest numbers, I updated the MXML tests for the latest version of Flex and Flash Player 9. You can get the updated source and SWFs here.

I'll leave the posting of a complete set of performance numbers for someone else. A few of my impressions:

Based on the relative speed of the Javascript tests, all but one (test 8) of the tests run faster than the Flash Player 8.5 (the beta for Player 9) numbers posted in October 2005.

Initial string concating is much faster than in the 8.5 numbers. (Alternatively, string interning doesn't give as much improvement.) The first half of test 3 and 4 are only twice as slow as the second half.

The harmonic, substring, and empty-for-loop tests (5, 6, 9) are blazingly fast now. 5ms, 10ms, and 60ms on my machine.

Lastly, I'll describe the changes made to the tests. The namespace in each MXML page was updated. Types were added to all variables, which should make the tests faster and clear up the warnings. Other simple warnings were cleared. The MD5 source was downloaded from the suggested site and quickly converted to AS3.

Update: The source and SWFs have been updated with a working test 10 from Mike. I've also updated the tests to clean up the MXML and remove the many warnings from MD5.as. Mike has also told me that he plans to update his page with the new results, and I'll update this page with a link when that happens.

Update 2: Mike has updated the numbers.

Update 3: Mike has updated the chart again, showing Java applets as well as the numbers for the latest version of Flash.

TrackBack

Listed below are links to weblogs that reference Updated performance tests for Flex and Flash Player 9:

» Actionscript and JavaScript performance tests updated from oddhammer
Way long ago I did a few tests comparing the performance of ActionScript 3 and JavaScript and I had kind of forgotten about them because I've got a wee bit too much on my plate. The initial tests I did were very promising, but were flawed because ... [Read More]

Comments (7)

mike:

awesome! I've been wanting to do this, but have been too covered up, so it's great to see someone carried the torch (and fixed my AS3 noob errors). :)

Bill:

"The harmonic, substring, and empty-for-loop tests (5, 6, 9) are blazingly fast now. 5ms, 10ms, and 60ms on my machine."

I hope that is 60ms for Flash 5, 10ms for 6, and 5ms for 9...?

Brian Deitte:

Nope- I meant for instance that harmonic is test 5 in the zip file and it took 5 ms. All of the numbers are just for AS3 and Flash Player 9.

Willi Burkhardt:

I know it's a while since the last post on this list. I think it's time to repeate the tests with the new gained JavaScript performance in Google chrome and Firefox ...
I am sure that there is also a performance gain on Flash' side.

Willi, I think it'd be very interesting to see updated numbers as well. I'm not volunteering to run them myself, but if someone else does, let me know!

Willi Burkhardt:

Brian, I've redone the tests with Javascript (IE7 and Firefox 3.5.1), Java, AS2 and AS3. I think my results are not in a state to be published yet.

My general conclusion is that JavaScript engnine(s) are on par with ActionScript. The general gain in speed is such that I think the tests need to be refined, like increasing iterations, to get meaningful results.

If you want to contact me by mail, I can send a spreadsheet.

Thanks Willi. I was more interested in them to hear the general conclusions, and it's interesting to hear they're getting close to the same numbers. If you end up posting these anywhere, let me know and I'll link to them.