Differences in JavaScript Performance Across IE9 Document Modes

I had a question come up from a customer: so, IE9 JavaScript performance is faster, and IE9 has 4 different document modes – are there differences in JavaScript performance across the document modes?

Now, I kind of suspected that the answer would be yes, but I didn’t actually know any details – and as a general rule of thumb, I don’t like to just assume that what somebody else told me is true (or even that I am actually remembering correctly – I’m not getting any younger, you know) so I figured we would run a little experiment and see what happened.

I decided to use the SunSpider performance benchmark, which tests JavaScript performance. While there is a newer version available, that newer version doesn’t work with older rendering engines, so I had to run the older version. This is the specific test that I ran:


I then ran this test in each of the 4 rendering modes in IE9, and for good measure I also threw in a test of the latest Firefox and Chrome. These were the results of running the test in an uncontrolled environment, a single time, on my computer – I am not attempting to make a scientific statement about absolute performance, just to gain an understanding of whether there are differences which are large enough to matter.


Wow. The outcome seemed really clear to me: when in IE9 or IE8 standards mode, IE9 performance is very clearly competitive with other modern browsers. However, once you drop to the two oldest compatibility modes, performance drops by an order of magnitude – that’s a big deal!

Since Compatibility View is the default for the Local Intranet zone, I would therefore strongly consider a program of enforcing the inclusion of X-UA-Compatible headers to opt in to one of the modern document modes in order to maximize the performance of your enterprise web applications, which is precisely the advice I gave to my customer.

If your JavaScript performance is not what you’d hoped in IE9, perhaps you should press F12 and check your document mode…

Comments (2)

  1. xpclient says:

    Also, 64-bit IE9 standards mode should give lower performance as 64-bit IE9 does not have the Chakra engine at all; something which Microsoft if made it clear upfront, people would not use 64-bit IE9 and suffer from degraded JavaScript performance.

  2. cjacks says:

    Actually, IE9 64-bit does have the Chakra engine, it just doesn't do JIT compilation – hence the order of magnitude performance difference for the 64-bit implementation.

Skip to main content