other tests

 

 
JavaScript
Java Applet

Flash Player 9
New "Flash Virtual Machine" - ActionScript 3

Flash Player 7 and 8
(old "Flash Virtual Machine") -
ActionScript 2
  (Firefox 1.5.0.6) run on 8/6/06 Firefox 2
11/24/06
(Opera 9.01)
run 8/6/06
(IE6) (IE7) Tested in XP (details here)
on 11/24/06
Tested with Flash Player 9 in FireFox 2
on 11/24/06
Published for Flash Player 7
Viewed with Flash Player 7
Published for Flash Player 7
Viewed with Flash Player 8
Published for Flash Player 8
Viewed with Flash Player 8
Published for Flash Player 7
Viewed with Flash Player 8 .5
Published for Flash Player 8
Viewed with Flash Player 8.5
Array join (array size 1000, 500 iterations) 390 375 188 172 172 249 303 382 552 552 567 549
Sort array (array size 1000, 500 iterations) 437 453 1219 687 750 106 414 26836 32212 31925 34950 34330
Concatenate short strings (50000 iterations) 390/407* 563/484 265/266* 391/406* 454/438 35 135 409 275   308  
Concatenate long strings (50000 iterations) 2266/4375* 2468/2218 4408/4641* 985/1032* 984/1032 77 135 712 252 191 309 174
Harmonic 250 297 47 65 63 1 5 85 113 125 149 155
substring (10000 iterations) 47 16 31 16 15 1 3 95 133 130 196 194
indexof (40000 iterations) 284 187 234 219 218 198 57 2295 1836 1813 1979 2017
Math.round(Math.random()*n) (40000 iterations) 170 172 78 92 93 9 7 609 485 313 469 484
empty for loop (10 million times!) 2703 1781 2828 2813 4953*
(error alert)
26 25 5590 7347 4591 7510 7486
misc test from a JS site 1 453 359 187 1280 1328 25 42 1779 630 422 602 620
MD5 - 1000 iterations 2 1969 1469 1015 1250 1453 6 95 4649 4431 3142 4101 4074
Function call w/return 80000 iterations 109 93 109 187 219 0.33 2 689 523   663  

 

 

All tests were on the same system (2Ghz AMD Athlon XP2400+ Windows XP 1.5Gb RAM)
All times are in milliseconds
All tests were repeated multiple times on different days (after reboots) and on different systems to ensure that the results were consistent, but variation is inevitable. Try the tests on your own system.. and please report problems..
Flash tests (FP7,8,and 8.5) were loaded in IE6
Flash Players used: 7.0.19.0,  8.0.5.0,  8.5.0.133,  9.0.18.60
* indicates first run / second run of the same function

Run the Java version (prepared by Bill Riemers) of the test here (note.. it takes roughly 70 seconds for the applet to load the first time on my system. Results shown above are from reloading the page) The detailed result from running his benchmark on my system is here (yep.. I rounded some numbers.. we're comparing 4649ms vs 6ms here)

Tests run on 11/24/06 used updated Flash SWF from Ted Patrick and used the released Flash Player 9. Some of the other tests (JS and FP7) were run again just to check that the results were still in line since they were run in the Fall of 2005. I didn't rerun all of the JavaScript tests for IE6, and didn't change the results because they were only off by a few miliseconds on most of them. I added the results for running JS in Opera.. and reran the Firefox tests since a new version was released.

Note that I did not run these test in the "stand alone" Flash Player. They're run in the browser because that's where almost all of my Flash code is executed. However, I've found in the past that code generally executes faster in the stand alone player.

1. JavaScript Speed test #3
2. JavaScript MD5 implementation
2. Flash implementation

other JS tests were based (sometimes loosely) on some of these

Download sources:
HTML,
FLAs/SWFs (ActionScript 2)
MXML (original) * note that my MXML is quite crappy because I hadn't even started learning ActionScript3 when I put this together..
MXML by Brian Deitte (strict typing made huge improvements over my original code)
MXML by Ted Patrick (note that all tests are run sequentially without unloading the SWF.. results vary greatly when I test multiple times)
Java by Bill Riemers