Going Deep

Inside IE 9’s High Performance JavaScript Engine

Download this episode

Download Video


The IE9 Platform Preview includes the first release of the new JavaScript engine. This new engine compiles JavaScript source code into high-quality native machine code. It also has a new fast interpreter for sequentially executing script on traditional web pages and contains several improvements to the JavaScript runtime (including improvements in type representation, polymorphic inline caching and efficient implementation of machine types). 

IE 9's JS engine employs a dual execution pipeline architecture which enables very efficient interpreting of JS code while at the same time compiling JS code in the background (on a different thread), taking advantage of the processing power of modern hardware.

In terms of code analysis, IE 9's JS engine analyzes hot functions and puts them into a queue for background compilation. There are other types of analysis that happen (or could happen). For example, the ability to change execution strategies based on power state (if a PC is on battery power, for example, then limit the amount of codegen). 

In this episode of Going Deep, we meet the leaders of the team that builds this new high performance JavaScript engine: GM Shanku Niyogi, Architect Steve Lucco and GPM John Montgomery. If you're interested in how IE 9's JavaScript engine works, then you'll certainly enjoy this great conversation.

Tune in. Enjoy.



Available formats for this video:

Actual format may change based on video formats available and browser capability.

    The Discussion

    • Ion Todirel

      I can haz a cat IE9? Smiley Excellent, I remember back in the day I actually had to re-architecture my JavaScript code to make it work smoothly with IE6 (it worked fine on Opera and Firefox).

    • soum

      Charles, next time you meet them can you ask them why they do not cache the native code once the JS method has been codegen'ed and run the cached code for future visits to the site, as long as the method stays the same?

    • Charles

      Yes, I can Smiley


      It's a very interesting case. It's also a harder problem to solve (on various levels) than it may appear to be on the surface (just cache compiled code and then run it on subsequent visits to the site is not an effective or safe approach). That said, I am not a JS engine developer. Next time I visit them, I'll be sure to ask about this.


    • exoteric

      Thanks for this Smiley


      I love the idea of both background compilation and background garbage collection.


      It'll be interesting to see what kinds of applications Chakra and other IE 9 creatures will enable.

    • Charles

      We didn't talk about Background GC for JS... Smiley You are referring to that mechanism in CLR4, I assume...


    • Richard1975


      I realise I may be late and offtopic, however, just want to say the  WMV(High) version is Excellent- Unreal infact. By the way what are the camera’s you guys use?

    • soum

      I know stating the entire semantics of caching compiled JS in a single line is oversimplification, but I ain't a JS engine developer either. So, let's hear it from those who are themselves.

    • exoteric

      Yep, I'm just merging the ideas in my head which they appear to be completely orthogonal. I don't know how parallelizable compilation and garbage collection is but even just background compilation and collection is a bit of a dream; I think the first time I read about parallel garbage collection was in Object Oriented Software Construction (OOSC) by Bertrand Meyer (could be mistaken), where the notion of a parallel garbage collection is introduced, I think it even mentioned it as taking place on a separate CPU (same die or not).

    • Charles

      We used a really nice camera (not sure of the exact model). Michael O'Neill, our awesome videographer/director/producer, flmed this. He's a pro!


    • Charles

      CLR4, shipping with VS2010, employs a background GC. Learn about it here: http://channel9.msdn.com/shows/Going+Deep/Maoni-Stephens-and-Andrew-Pardoe-CLR-4-Inside-Background-GC/



    • Charles

      We will Smiley


    • deedubb

      "For example, the ability to change execution strategies based on power state (if a PC is on battery power, for example, then limit the amount of codegen)."  ... I believe this is mentioned in the video as well...


      And then you guys talked about how it's bad to let the developer give 'hints' how to run the code [generally I agree], so I'll assume there is no "disregard power state flag"...  I can just imagine someday, somewhere, people are going to hit a bug where someone complains "the website seems slow on my browser but only on my laptop and only on my commute to work".


      Honestly, I dislike the idea of VM logic changes based on state (such as current load or power state) for anything but garbage collection


      Just get it right Smiley

    • boroleprash​ant

      Does the JS engine come as a library that can be reused in other apps apart from IE9, similar to V8?

    Comments closed

    Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.