Celtic Kane

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.

2008 September 2

Web Browser Average Runtime Relative
Safari 3.1.2 344 1x (fastest)
Opera 9.5.2 420 1.2x slower
Firefox 3.0.1 (with add-ons*) 506 1.47x slower
Firefox 3.0.1 (no add-ons) 538 1.56x slower
Google Chrome 0.2.149.27 557 1.62x slower
IE8 Beta 2 806 2.35x slower
*Firefox add-ons include Download Statusbar, Fission, Foxmarks Bookmark Synchronizer, Hide Menbar, and Tab Scope.
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.

2007 September 10

Web Browser Average Runtime Relative
Opera 9.50a 615 1x (fastest)
Opera 9.23 695 1.1x slower
Safari 3.0.3 790 1.3x slower
IE7 1077 1.8x slower
IE7 (no add-ons) 1090 1.8x slower
Firefox 2.0.0.6 (safe mode) 1385 2.3x slower
Firefox 2.0.0.6 2285 3.7x slower
Firefox 3.0.0.7a (safe mode) 2465 4.0x slower
Firefox 3.0.0.7a 2722 4.4x slower
For more information, see the 2007 benchmark test page.
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.

2006 August 2

Web Browser Average Runtime Relative
Opera 9.0 422 1x (fastest)
IE6 (SP2) 1622 3.8x slower
Firefox 1.5 (safe mode) 1752 4.2x slower
Firefox 1.5 1974 4.7x slower
For more information, see the 2006 benchmark test page.
Commentary: This test was one of the first, documented Javascript benchmarks to show the superiority of Opera over the more popular Firefox.

Technical Notes

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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.

The Test

Test Type Runtime (ms)
Array object
0
Date object
0
Error handling
0
Math object
0
RegEx object
0
String object
0
DOM
0
Ajax declarations
0
Total Duration
0

*** ALERT ***

This javascript benchmark is obsolete and has been replaced by a new product. For the updated benchmark, please visit: http://jsbenchmark.celtickane.com

66 Responses to “Web Browser Javascript Benchmark”

  1. ben2talk says:

    I noticed Midori is damned fast – faster than Chromium!

    Nice webkit browser, renders the text on this page a damned sight more smoothly than Firefox does.

  2. Christian says:

    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..

  3. Matt says:

    Array object
    8
    Date object
    8
    Error handling
    3
    Math object
    3
    RegEx object
    11
    String object
    4
    DOM
    23
    Ajax declarations
    49
    Total Duration
    109

    Chromium nightly; v4.0.212.0 (26668)… now it gets interesting…

  4. Muaddib says:

    Hardware:
    Phenom 8450 2,1@2,5 DDRII-800@1000 and system Suse 11.1 with kernel 2.6.27.29-0.1-pae optimized (K8).
    Software:
    1. Firefox 3.5.2 (optimized for K10) – 291ms
    2. Opera 10 – 409ms
    3. Midori 0.1.4 – 163 ms
    Midori WIN.

  5. xpaulso says:

    Array object
    7
    Date object
    56
    Error handling
    2
    Math object
    3
    RegEx object
    9
    String object
    4
    DOM
    13
    Ajax declarations
    63
    Total Duration
    157

    Ubuntu 9.10
    Chromium nightly 4.0.221.5 (Ubuntu build 27968)

  6. Vlastimil Pavlištík says:

    11.October 2009

    PC:
    Pentium Dual-Core E6300
    2GB RAM DDR2

    Browsers:
    Google Chrome 3.0.195.25 – 233ms
    Opera 10.00 – 297ms
    Safari 4.0.3(531.9.1) – 339ms
    Internet Explorer 8.0.6001.18702 – 625ms

    CHROME WIN!!!