Quantcast

Microsoft Improves JavaScript Performance In Windows 8

Get the WebProNews Newsletter:
Microsoft Improves JavaScript Performance In Windows 8
[ Developer]

As a long time follower of Microsoft, it’s still surprising to see the company embracing open Web standards. The company is so enamored with the open Web that they are building Windows 8 Metro apps and Internet Explorer 10 with HTML5 and JavaScript in mind. With the launch of the Windows 8 Release Preview behind them, Microsoft took some time out to explain their advancements in JavaScript.

The catalyst that forced Microsoft’s hand into moving towards open Web standards is the idea that the Web is alive. The arrival of HTML5 and the evolution of CSS and JavaScript has forced Microsoft to rethink how we think of the Web. To that end, they have started to evolve their own proprietary JavaScript engine to address the ever growing Web.

Microsoft’s JavaScript engine is called Chakra. If you’re familiar with Buddhist philosophy, you’ll know that Chakra is the driving force that circulates energy throughout the body. Microsoft’s engine does just that but the body is a Web page. It’s an engine that circulates the execution of different processes of JavaScript through the use of a computer’s hardware including multiple cores. It achieves this through the use of parallel architecture that processes and executes the code on one core while offloading garbage collection and the JIT compiler to the other cores.

Microsoft JavaScript Windows 8

Chakra has been around since IE9, but Microsoft is really kicking things up a notch with IE10. Since all Web sites use JavaScript in one way or another, Chakra has dramatically reduced load times by simplifying the process at which code is executed.

These performance boosts have also been passed on to heavy users of JavaScript – Web applications. To help games and other HTML5 powered applications load faster, Microsoft has introduced four advancements that greatly improve performance.

The first is a change to Chakra’s JIT compiler that adds support for x64 and ARM architectures. This allows it to execute directly on the CPU granting it more flexibility and speed. This is used to reduce the amount of machine instructions for code thus reducing memory footprint.

The second is an improvement to JavaScript’s floating point arithmetic that’s used in games, video, etc. They have simplified the instructions directed at this particular code in IE10 that has it executing code 50 percent faster than in IE9. Since IE10 is only available on Windows 8, you can expect HTML5 applications to perform admirably on the operating system.

The third has Microsoft improved property access. In IE9, Microsoft utilized inline caches that could remember shapes of objects and the corresponding location in the object’s memory where a property can be found. The only problem was that it could only remember one object shape at at time. With IE10, Microsoft has introduced a secondary caching mechanism that will allow the operation of code on objects of different shapes.

The final improvement sees Chakra’s garbage collection system getting some enhancements. It was found that HTML5 games discard objects a high rate and JavaScript doesn’t just destroy these objects. It would rather collect these discarded objects and store them in a garbage collection. This creates a problem as the browser will occasionally become bogged down as it’s trying to collect the garbage and become unresponsive. To combat this, IE10 not only reduces the amount of memory that’s consumed, but it also delays garbage collection until after the script has been inactive for some time. This way, the user won’t perceive browser lock ups during the middle of an application.

If you’re confused after all of that, just know that Internet Explorer 10 is a beast. Microsoft is being really aggressive about making their latest browser one of the best on the market. If you use Windows 8, IE10 isn’t a bad choice at all. If you still don’t trust IE after all the years of betrayal, you can now download Chrome for Windows 8.

Microsoft Improves JavaScript Performance In Windows 8
Top Rated White Papers and Resources
  • Cristian

    What a jackass. Why bother with this post at all if you’re going to end it like that?