I found the Computer Language Shootout on debian.org via Jim Rutherford and thought it was just too tempting.. just where does ActionScript fit in there? Hmm.. that's a question I've been wondering since AS3 was released to developers. I did a few tests comparing ActionScript3 and JavaScript and found that AS3 had closed the performance gap finally... but just how does AS3 compare to Fortran?


So I picked the "binary-trees" test to find out.. I've only tinkered with AS3 (I won't be able to use it for production for probably a year) so I've still got a couple of warnings showing up when it compiles, but the results are very promising.


Here are the results for Flash Player 9/ActionScript 3/Flex2 I saw on my old AMD 2Ghz Athlon Win XP system.. It looks like the system they're using, "a single-processor 2.2Ghz AMD™ Sempron™ machine with 512 MB of RAM", is fairly close to what I'm using.. so we're in the ballpark.




And here's where ActionScript3 would fit into the benchmark table for this test..


Now.. as you can see it takes roughly 39 seconds on my system to run this test.. that's not blazing at all when compared to Clean at 1.73 seconds (on their system). ... but.. Ruby came in at 352 seconds.

Here's the SWF that I made if anyone cares to try it.. (requires Flash Player 9). And the code.. in case someone wants to fix my errors (yep.. I'm a AS3 rookie..). Ideally I'd run their tests on my system or have them run my test SWF on their system.