March 18th, 2010
In this post, we look at the engine we’re building in IE9, and our approach to script performance.
A Look Back at IE8
With IE9, we decided that we needed a better approach to building a script engine for the present and future demands of the Web. Clearly, the new engine had to be able to run traditional pages well. But the engine also needed to perform well on Web applications of today and the HTML5 application of tomorrow, as well as keep up with changes in the Web and in the devices used to browse it.
As browsers have made their interpreters faster and added various forms of code generation, their scores on these benchmarks have improved. Over time, the relative gap between browsers on these benchmarks has narrowed significantly. In the work we’ve done for the IE9 Platform Preview, we have already substantially improved performance from IE8, since PDC, and will continue to do so as we work on IE9.
Going Beyond the Benchmarks
- Great responsiveness in loading web pages with script. In our tests, we find that typical sites and applications use 10% to 30% of page load time running script. Code compilation and optimizations aren’t always effective, because the time needed to do this may offset the savings of running optimized code.
- Responsive modern Web applications. Script-intensive sites such as Gmail and some of the IE9 TestDrive demos behave more like applications than static web pages, and can spend much as 30% to 90% of time doing operations on script.
An engine should be able to easily adapt to changes in applications and patterns used on the Web, and to changes in hardware used to view the Web.
So, let’s take a look at how we are building IE9 to meet these characteristics:
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.
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.
What Comes Next?
As we work on IE9, we will continue to improve all facets of script performance: tuning our compiler, type system, libraries, and other runtime aspects such as memory management and DOM interoperability. We will also work on other dimensions of performance, such as memory usage and power consumption. The script engines of tomorrow will be judged how well they tune their performance across all these dimensions, across the entire Web.