How fast is Internet Explorer 9 compared to Firefox, Chrome, and Opera

There has been a lot of activity in the browser market over the past few months. The most recent step forward is Microsoft’s release of Internet Explorer (IE) 9. Microsoft is touting improvements with IEs handling of web standards, graphics, and JavaScript. JavaScript has become the de-facto standard for web designers of dynamic and highly interactive websites. Since so many websites use JavaScript, it is very important for browsers to be able to process it very quickly. In this entry I’m going to compare the JavaScript performance of Microsoft IE8, Microsoft IE9, Mozilla Firefox (v3.6), Google Chrome, and Opera using the SunSpider JavaScript Benchmark available at:

In order to provide the most equal environment for the tests, I ran the benchmarks on the same machine (Windows 7 Ultimate running within a VMWare virtual machine), with no other applications running, right after a fresh reboot. I then directly navigated to the benchmark site. For the purposes of this examination, I’ll only discuss the total results of the benchmark, however, the site gives very fine grain details of the results of the test.

Here are the results of the examination:

Browswer:                     Time To Execute:
=================== =============================
IE 8 (v8.0.7600.16385) 4089.6ms +/- 2.4%
Firefox (v3.6.10) 1186.8ms +/- 7.8%
Opera (v10.62 b3500) 525.4ms +/- 21.9%
Chrome (v6.0.472.62) 370.4ms +/- 4.8%
IE 9 (v9.0.7930.16406) 647.6ms +/- 9.5%

From these results, we can see that Microsoft has greatly improved the performance of its JavaScript engine (they have cut the benchmark time in half). Though not as fast as Opera or Chrome, which are both highly optimized for JavaScript performance, IE9 has made significant inroads. The release of IE9 has raised the bar for the Mozilla community to continue to improve Firefox. Considering IE9 is still in a beta state, one can only imagine that the performance will only improve.

How did Microsoft improve its JavaScript Engine? According to Microsoft, they were able to make the improvements by using the following techniques:

JavaScript Background Compilation: Many script engines today start with an optimized interpreter, and compile individual sections or methods into machine code to run faster. Others always compile JavaScript into machine code before running it, often compiling each method as it is needed. Both these approaches have to trade off quality or quantity of compiled code against execution speed. Generating high-quality code for today’s applications requires time to optimize the compiled code.

IE9 includes a fast interpreter for running pages quickly on startup. For compilation, we have a background code generator that compiles script code, and we push compiled methods back into the application. Because the code generator runs in the background, it can take advantage of today’s advanced multi-core machines and generate higher-quality code, while not blocking initial execution of the application.

Type Optimizations: One of the most important aspects of enabling performance on JavaScript is to create an efficient type system. The IE9 script engine uses many of the techniques common in modern dynamic language implementations, including type representation, polymorphic inline caching (also called type evolution or hidden classes), and efficient implementation of machine types.

Fast Interpreter: For pages where immediate execution in the interpreter is important, IE9 includes a new interpreter which uses a register-based layout, efficient opcode, and use of type optimizations.

Library Optimizations: The performance of JavaScript pages and applications depends heavily on key aspects of the script runtime library: strings, arrays, objects, and regular expressions. We are investing in these areas for IE9. These libraries require careful tuning for the real Web – one example is the execution of regular expressions. Most script engines today use compilation and optimization techniques to run regular expressions faster, and IE9 includes an improved regular expression implementation. In analyzing real world Web sites, we find a set of patterns used frequently, but we also find unique cases – for example, a site that creates hundreds of regular expressions and uses very few of them – we will continue to use this data to tune our regular expression implementation and other library features for IE9.

Considering IE9’s support for modern standards such as HTML5 and CSS3, and GPU support for graphics Microsoft has made a great step forward in the “Browser wars.”

To learn how to take best advantage of the use of modern technology combined with inspired ideas to bring your business to the next level, contact us at Force 5. We’d be happy to help!