I’ve been dipping my toes into Flex (nice stuff) and trying to get a better feel for what Flash Player 8.5 and ActionScript 3 is going to give in terms of performance. It’s a major (costly) problem for the group I work with to move from one Flash Player to the next, so being able to see ahead and get an idea of which Flash Player to adopt is a huge benefit to us. Thanks to MM for letting us have the alpha to bang on for a while. ![]()
Early testing showed me that the new virtual machine was blazing fast, and I did some tests comparing the same code in the Flash Player 8 and Flash Player 8.5. When the code was published from Flexbuilder it ran fast.. so fast it made me wonder if maybe Flash had finally caught up to JavaScript.
You see, back in the day.. with Flash 4 and 5 (before Ajax.. hehe..) I used to work with JavaScript and would send stuff from the SWF out to JavaScript for the heavy lifting. JavaScript made Flash look SLOW. So I decided to search around a bit and find some tests that were geared towards JavaScript, port them over to ActionScript, and do a little “head to head” action. In most cases the “port” involved changing a line or two of code.
The results blew me away.. the improved performance will make the decision to move to the next Flash Player (8.5? 9?) easy. see for yourself..
And please check over the sources and e-mail me if you spot anything.
Some of the tests are more valuable than others.. I was following known JavaScript tests for the most part. If you have other tests or ideas for tests please let me know.
27 Oct 2005 at 12:03 am | #
Interesting you didnt do any published and viewed in flash 8. Strange to see such little inprovement in substring operations when they are the bread and butter of alot of applications so to speak.
27 Oct 2005 at 01:39 am | #
It simply looks like some operations were previously coded in ActionScript.
But substring and strings concatenations' speed are very deceiving, even slower than the Flash 7 player.
27 Oct 2005 at 07:55 am | #
It would be interesting to see the results of these tests after the initial first pass has run and subsequent passes execute.
In Flash's case, we have a unique string table containing all unique strings currently in use (called interning). For the concat test case, we need to intern the integer strings from 0 to 50k on the first pass of the for loop. This takes the majority of the time. On a 2nd pass, Flash/AS3 can run in about 70 msecs since the integer strings are already interned in the table.
I'd be curious if other platforms also show speed ups on the 2nd loop.
27 Oct 2005 at 11:51 am | #
Hi...I published all the FLA's in F8, for F8. You can download the swfs here:
http://rorexrobots.com/flash/publishedFor8.zip
27 Oct 2005 at 06:56 pm | #
I reran a couple of the tests to check out what Werner pointed out and also added one. Yow. Very good results.