Web Browser Javascript Benchmark

How does your favorite browser’s Javascript engine speed compare to other popular browsers? The speed of your browser’s Javascript is becoming more and more important because of Web 2.0′s reliance on Ajax and complex Javascript libraries. I have written a benchmark test, which you can run on your machine at home, to compare the newest versions of Internet Explorer, Opera, Safari, and Firefox. How does your favorite browser stand up to the competition?

Preface

In 2006, I originally wrote a Javascript speed test that is a derivation of the test that I use today. The test gained quite a bit of attention, so I created a subsequent test to compare browsers that had been released after the first test (i.e. Safari for Windows). Due to popular demand in the form of a flurry of e-mails, I have decided to continue posting my test results with the newest versions of popular web browsers. All of my tests will be using the Javascript test script, which is available by scrolling down to the bottom of this page.

Test Results

2009 July 10

Web Browser

Average Runtime

Relative

Safari 4.0.2 (530.19.1)

169

1x (fastest)

Chrome 2.0.172.33

349

2.1x slower

Firefox 3.5

377

2.2x slower

Opera 9.64 (10487)

442

2.6x slower

IE 8.0

771

4.6x slower

*Firefox add-ons include Download Statusbar, X-Marks, and Firebug. Note that runtimes were equivalent with and without add-ons.

Commentary: Safari has taken the lead by performing about twice the speed of its nearest competitors, Chrome and Firefox. Opera, the once champion of the speed test, has fallen from its throne to the second-to-last position. Perhaps the most surprising is how much worse IE8 fared relative to its competitors — it was 2-3 times slower, but now is performing almost five times slower.

Commentary: I really expected Google Chrome, which was released today, to do much better than it fared in the test results. Then again, a lot of Google Chrome’s claim to fame isn’t really geared to a benchmark test like this — it’s more intended for security and live applications that require extensive garbage collection and utilizing non-linear loading of page elements. Regardless, Safari still holds the crown for the fastest Javascript engine, but almost all other browsers (with the exception of IE8 Beta 2) are very, very close behind — almost so close that it’s not really a practical difference (except for bragging rights). It’s going to be very interesting to see how the future versions of Google Chrome are able to compete with the more seasoned browsers.

2008 March 28

Web Browser

Average Runtime

Relative

Safari 3.1 (525.13)

339

1x (fastest)

Firefox 3.0.pre beta (safe mode)

501

1.5x slower

Opera 9.50 beta (9841)

517

1.5x slower

Firefox 3.0.pre beta (extensions disabled)

538

1.6x slower

Opera 9.26 (8835)

657

1.9x slower

IE8 Beta 1

933

2.8x slower

IE7

1099

3.2x slower

Firefox 2.0.0.13 (no extensions)

1256

3.7x slower

Firefox 2.0.0.13 (safe mode)

1373

4.1x slower

Firefox 2.0.0.13 (with extensions*)

2416

7.1x slower

*Because most Firefox users install extensions, I thought that it was only fair to include a test with my own typical extensions. The extensions I had installed for the test include: Adblock Plus 0.7.5.3, ColorZilla 1.0, Download Statusbar 0.9.6.1, Firebug 1.05, Fission 0.9.5, Foxmarks Bookmark Synchronizer 2.0.45, and Hide Menubar 1.0.20080310. I did not include a test with the Firefox beta using extensions because the extensions are not considered compatible with the beta yet.Beta versions of Firefox and Opera were downloaded from nightly builds that were available on 3/27/2008

Commentary: In contrast to previous tests, Safari championed the fastest Javascript benchmark, overtaking Opera from its throne. Even more promising, the Firefox beta was considerably faster than its currently released version (2.0.0.13). This is the first test that has shown Firefox’s Javascript engine to be superior to the engines of Opera and Internet Explorer.

Commentary: This test was done in response to Apple’s release of Safari for Windows. Similarly to the 2006 test, Firefox was considerably slower than Opera, Safari, and Internet Explorer. Note that the Firefox alpha version was slower than the stable version.

Commentary: This test was one of the first, documented Javascript benchmarks to show the superiority of Opera over the more popular Firefox.

Technical Notes

The numerical score generated by this test is relative — that separate test results, run at different times or on different machines, cannot be directly compared to each other. You may only compare multiple browsers within the same test session with the same test environment.

My results for each browser are averages — to get a browser’s score, I have run each test ten times, and taken the average score from all ten tests.

Your raw numbers are not comparable to mine — because the raw numbers are relative, you can only compare one browser to another browser on your own machine. I have included the Javascript benchmark test below so that you can perform your own test. I encourage you to use it to generate your own comparative test, and even examine the Javascript code to examine the test itself.

I have included alpha, beta, and released versions — I have included browser versions that are still in testing just for comparative purposes. Please realize that a browser’s beta performance does not necessarily reflect its future, release performance.

Do your own testing – your results may vary! — I may have a different operating system, hardware configuration, and development environment than you, so your results may be different! I highly encourage you to do your own testing and see which browser is the best performer on within your own environment.

Safari seems to provide very different results from time to time. No other browser vary so much between fastest and slowest as Safari does. And my experience when it comes to “actual use” tells me that Chrome is much faster…imho..