Microsoft's JavaScript Engine Learns New Tricks For Windows 10

| by David Iffland Follow 4 Followers on Oct 15, 2014. Estimated reading time: 1 minute |

The Internet Explorer team at Microsoft recently detailed changes to the JavaScript engine coming in Windows 10. A significant change is the addition of a new tier in the Just-in-Time (JIT) compiler.

The JavaScript engine, Chakra, was first introduced in IE9 and powers not only Internet Explorer but web-based apps downloaded from Microsoft's app stores. Chakra starts by running JavaScript with an interpreter, a slow but flexible method. Once a method or loop becomes "hot", Chakra will use its JIT compiler to generate optimized machine code.

In Windows 10, Chakra now includes a second JIT compiler that bridges the gap between slow, interpreted code and fast, optimized code. It uses this middle-tier compiler, called Simple JIT, as a "good enough" layer that can move execution away from the interpreter quicker than the Full JIT can. Microsoft claims that the changes will allow certain workloads to "run up to 30% faster".

Simple JIT avoids generating code with complex optimizations... In most cases, the time to compile the code by the Simple JIT is much smaller than the time needed to compile highly optimized JIT code by the Full JIT compiler.

The move to a two-tiered JIT compiler structure mirrors what other browsers have done. SpiderMonkey, the JavaScript engine in Firefox, has an interpreter and two compilers: Baseline and IonMonkey. The Baseline compiler was first introduced in Firefox 23 and provides the same intermediate step as the Simple JIT compiler in Chakra. In Google Chrome, the V8 JavaScript engine announced their two-tiered compilation system in 2010, but V8 does not use an interpreter.

Beyond the addition of a new JIT tier, Chakra can now split the job of compiling code to many background threads. Before, it only used a single background thread,

Whenever Chakra determines that it is running on a potentially underutilized hardware, Chakra now has the ability to spawn multiple concurrent background threads for JIT compilation.

The V8 Engine compiles on a single background thread.

The nature of the web doesn't allow JavaScript code to be compiled ahead of time; thus, the compilation must happen on the client. The first version of Firefox to include a JavaScript native code JIT compiler was version 3.1 and Internet Explorer first got the feature in IE9. V8 has had its JIT compiler from its start.

The new Internet Explorer is available as part of the Windows 10 Technical Preview.

Rate this Article

Adoption Stage

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread


Login to InfoQ to interact with what matters most to you.

Recover your password...


Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.


More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.


Stay up-to-date

Set up your notifications and don't miss out on content that matters to you