Freigeben über


Bringing asm.js to the Chakra JavaScript engine in Windows 10

Earlier today, we flipped asm.js to “In Development” at status.modern.ie. Support for asm.js has been one of the top 10 most-requested items at the IE Suggestion Box on UserVoice since we launched it in December.

Delivering an interoperable & spec compliant JavaScript engine with the capabilities and performance for modern experiences has been a key goal for us since the inception of Chakra. Bringing near-native performance for JavaScript code execution is a part of the same. We recently shared the details of some of the work we’ve done in Windows 10 to boost JavaScript execution speed in the Chakra engine.

Over the last few months we’ve taken a close look at asm.js as a technology, related technologies, and what they entail for the Web at large. While challenging to write by hand, asm.js is leveraged principally by transpiling C/C++ code to run on the Web platform, utilizing technologies such as WebGL and Web Audio. Asm.js is a clear step towards enabling near-native performance for the Web platform, which is why we’re excited to bring it to Chakra in an upcoming release.

Amongst other similar initiatives, asm.js as a technology has two key characteristics that we like:

  • First and obvious is the boost to JavaScript execution speed, which we’ve already talked about. We believe that asm.js and the work we do to enable asm.js has the potential to provide speed benefits to many more scenarios over a period of time.
  • Second but more importantly is the fact that asm.js is a pure subset of JavaScript and guarantees interoperability across platforms and browsers. This means that engines that support asm.js light up the new features, while engines that don’t will simply run with degraded performance. Since the beginning of Chakra, our team’s focus has always been to prioritize this approach to new functionality.

During this period, we’ve also been working closely with folks from the Firefox team who are working on asm.js, to learn from and partner with them to bring asm.js to the Chakra JavaScript engine.

We look forward to sharing more details and getting your feedback as we advance our implementation towards a preview state.

— Gaurav Seth, Principal PM Manager, Chakra Team
— Ed Maurer, Principal Group Software Engg. Manager, Chakra Team

Comments

  • Anonymous
    February 18, 2015
    Awesome news. This will be a game changer for data crunching web developers like me.

  • Anonymous
    February 18, 2015
    Sounds really good. This is where Mozilla contributes for the entire web with its technologies.

  • Anonymous
    February 18, 2015
    The comment has been removed

  • Anonymous
    February 18, 2015
    This is fantastic news and I am very glad to hear it. Will make sure to use it thoroughly. :]

  • Anonymous
    February 18, 2015
    Awesome. Excited for this!

  • Anonymous
    February 18, 2015
    Woohoo!

  • Anonymous
    February 18, 2015
    Wow! great work IE!

  • Anonymous
    February 18, 2015
    This is what I've been expecting for so long.

  • Anonymous
    February 18, 2015
    Thus is great news. The way Microsoft has escaped from its historical Not-Invented-Here hangups over the last couple of years has been really impressive to watch. Dare we hope that integration of something like Emscripten into Visual Studio is on somebody's roadmap? IIRC the current plugin only supports VS2010.

  • Anonymous
    February 18, 2015
    So will this also be available to WinJS Modern apps?! and exposed via WebView in XAML Modern apps?!

  • Anonymous
    February 18, 2015
    Wow! great work IE!

  • Anonymous
    February 18, 2015
    Great to hear. ASM has opened up some very exciting possibilities for projects I'm working on - the wider and wicket the adoption the better :)

  • Anonymous
    February 18, 2015
    @great news... - Yes. It is the same Chakra engine underneath both those.

  • Anonymous
    February 18, 2015
    The comment has been removed

  • Anonymous
    February 18, 2015
    Great. Another good News form microsoft. Keep it up...

  • Anonymous
    February 18, 2015
    Great news. What about running Silverlight on top if asm.js?

  • Anonymous
    February 18, 2015
    Now where are the people saying "just use webkit"? Great move IE team!

  • Anonymous
    February 18, 2015
    Too bad you didn't spend your time on Object.observe first. Polling is so ancient...

  • Anonymous
    February 18, 2015
    Will it work on Windows 10 for phones?

  • Anonymous
    February 18, 2015
    Nice guys! Can't wait to see it in action! Great Job!

  • Anonymous
    February 18, 2015
    I am for new technology, ASM.JS sounds like assembly but it is just JavaScript that the browser still have to convert to assembly, I don't see any benefits, but hey, if the world wants :-)

  • Anonymous
    February 18, 2015
    This is great news! Are you perhaps considering looking at native SIMD.js support at the same time?

  • Anonymous
    February 18, 2015
    Ghjjhnn

  • Anonymous
    February 19, 2015
    Great news - next a Dart VM!

  • Anonymous
    February 19, 2015
    The comment has been removed

  • Anonymous
    February 20, 2015
    The comment has been removed

  • Anonymous
    February 20, 2015
    @noname, it is reported that all Windows 7 and 8.1 would be able to receive the Windows 10 upgrade for free in the first year since its release.

  • Anonymous
    February 21, 2015
    Sorry if I don't join in cheers with others here but I can't help this is going into a stupid direction. OK I understand the need for better speed, especially for applications such as gaming. I also understand the limitations and compatibility requirements of JS. Basically, asm.js is an assembly language, a kind of byte-code. "While challenging to write by hand", that's a very gentle way to put it :D It has 2 key characteristics which you accurately listed: 1. Speed boost; 2. compatibility: "guarantees interoperability across platforms and browsers." But the second one is just a lie. If your speed requirements are such that you need to introduce a new byte code into the browser to be usable, then performance is a feature and you're not backward compatible anyway. I just tried Quake JS in the latest IE11. Yes it ran. At 10 fps. Which is already quite impressive but I will stand no chance against other players at 60 fps. This is not "compatibility". So if you're introducing a new byte-code into the browser (and that's probably a good idea), which will be a breaking change for the applications that need it anyway, why don't you sit down and come up with a well designed byte-code? You have plenty of experience to do that. I fear that we'll come to regret this half-baked "js byte-code" in the future and wish we did something more intelligent, compact, extensible...

  • Anonymous
    February 21, 2015
    The comment has been removed

  • Anonymous
    February 21, 2015
    Thanks for this nice article. Keep it up. :) alquranonlinelearning

  • Anonymous
    February 21, 2015
    The comment has been removed

  • Anonymous
    February 21, 2015
    The comment has been removed

  • Anonymous
    February 22, 2015
    JavaScript is assembly code after all... great news... a stepping stone to a better future

  • Anonymous
    March 03, 2015
    Amazing! Heh It'd be cool if they made a compiler like emscripten but for msvc and gave it the ability to compile modern apps for the web (Even if they used native languages!) then you could try out an app on a webpage and install the native version if you liked it. sort of like firefox OS

  • Anonymous
    March 12, 2015
    Shamim90 )24@gmail.com