Ryan Lanciaux

Random programming blog.

IE8 vs Firefox 3.0b5 JavaScript Part 1

Last time I posted on the latest browser from Microsoft vs. Mozilla's latest I had compared page download times between the two browsers. This time, I would like to take a brief look at how they stack up in regard to JavaScript.

John Resig (of jQuery / Mozilla fame) announced the Dromaeo: Javascript Performance Testing suite yesterday. The suite runs some of the same tests as the WebKit team's SunSpider, however, there are some improved methodolgies (see the suite's wiki for more info on this). I don't know how often I feel like doing DNA Sequence Alignment in JavaScript but I think it would be a good way to quickly get some metrics of how both FireFox and IE8 handle the code.

The Comparison:

I ran the tests in groups because there were certain ones that were not finishing under IE8. To be quite honest, I'm not 100% sure if this is an Internet Explorer issue, or an issue with the tests. Both are a work in progress so I would rather not make assumptions at this point. Anyways, the results of the tests are listed below:

Test Name
Firefox 3.0 beta 5 Internet Explorer 8
Fannkuch v122 802.80ms 1032.20ms
Base 64 Encoding and Decoding v122: 2942.00ms Would not finish
DNA Sequence Alignment v116: 420.00ms Would not finish
N-Body Rotation and Gravity v122: 270ms 529.40ms
Prime Number Computation (2) v122: 305.80ms 518.20ms
Recursive Number Calculation v122: 184.40ms 417.80ms
Traversing Binary Trees v122: 156.80ms 422.20ms

The Results

The initial results look like Firefox is performing the more advanced Javascript operations faster than Internet Explorer. That being said, Dromaeo, IE8 and Firefox 3.0b5 are still being developed so a lot could change before the release. For more metrics view a comparison on the Dromaeo site of Safari 3.1, Firefox 3.0b5, Opera 9.5 and IE8b1. Let me know what you think or if you've encountered different results.