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 (35)

  1. wildert says:

    Awesome news. This will be a game changer for data crunching web developers like me.

  2. diksito says:

    Sounds really good. This is where Mozilla contributes for the entire web with its technologies.

  3. spencer kelly says:

    Love this. Thank you for supporting this standard. Js ftw

  4. Milan says:

    This is fantastic news and I am very glad to hear it. Will make sure to use it thoroughly. :]

  5. benhorst says:

    Awesome. Excited for this!

  6. A Dilliwal says:

    Wow! great work IE!

  7. ASkara says:

    This is what I've been expecting for so long.

  8. mrec says:

    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.

  9. great news... says:

    So will this also be available to WinJS Modern apps?! and exposed via WebView in XAML Modern apps?!

  10. Alexander Duque Builes says:

    Wow! great work IE!

  11. Tom Jenkins says:

    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 ๐Ÿ™‚

  12. @great news… – Yes. It is the same Chakra engine underneath both those.

  13. Tristan says:

    Instead of inventing primitive tricks to accelerate javascript, let W3C (or ecma) standardize ByteScript – byte encoded low-level intermediate assembler. Easy to parse, low size with fast execution. Then every compiler – TypeScript, Dart, C++ and others – can ganerate code into ByteScript. Javascript will stay only for legacy pages.

  14. Madhu Rakhal Magar says:

    Great. Another good News form microsoft. Keep it up…

  15. John Billingsly says:

    Great news. What about running Silverlight on top if asm.js?

  16. Onur G says:

    Now where are the people saying "just use webkit"?

    Great move IE team!

  17. David S says:

    Too bad you didn't spend your time on Object.observe first. Polling is so ancient…

  18. GuestDev says:

    Will it work on Windows 10 for phones?

  19. DvdBrink says:

    Nice guys! Can't wait to see it in action!

    Great Job!

  20. GTX says:

    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 ๐Ÿ™‚

  21. Terje says:

    This is great news! Are you perhaps considering looking at native SIMD.js support at the same time?

  22. Davy Mitchell says:

    Great news – next a Dart VM!

  23. noname says:

    Windows 7็‰ˆใฎIE11ใ‚‚Windows updateใ‚’้€šใ˜ใฆๅฏพๅฟœใ—ใฆไธ‹ใ•ใ„ใ€‚

    ใ‚ใ€ใƒกใ‚คใƒณใ‚ตใƒใƒผใƒˆๅˆ‡ใ‚Œใฆใ„ใ‚‹ใฎใงๅฏ่ƒฝใงใ‚ใ‚Œใฐใงใ™ใ‚ˆใ€‚

    ใ‚ใจใ‚ใŒใพใพใ™ใฟใพใ›ใ‚“ใŒSpartanใ‚‚ๆฉŸ่ƒฝๅˆถ้™็‰ˆใง7~8.1ใซใ‚‚ๆฌฒใ—ใ„ใชใจใ€‚

    ไปŠๅพŒใงใ„ใ„ใฎใงใ‚ˆใ่€ƒใˆใŸไธŠใงใ€ใƒชใƒชใƒผใ‚นใ™ใ‚‹ใ‹ใฉใ†ใ‹ๅˆคๆ–ญ้ก˜ใ„ใพใ™ใ€‚

  24. Rasmus says:

    Awsome, web components next and then Dart!

    @Tristan That is exactly what asm.js is

    @GTX Nah, it's javascript compatible assembly. It's very fast and easy to get to native.

  25. _bug_ says:

    @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.

  26. bystander says:

    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 ๐Ÿ˜€

    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…

  27. Daily Gimmick @Microsoft says:

    PERFORMANCE you said? PERFORMANCE they said?

    Ok lets search for the word "performance" on Connect and revisit all the issues you have blatantly denied to address over the course of years and they STILL exist!

    You have not only lost IE fans or IE users with your denials, but also fend away tons of Windows user base to other OSes and browsers. IMO IE team's attitude is one of the chief reason of MSFT's downfall in last decade of Web Era. All my colleagues, OSS community acquaintances, devs and designers in my circle of interactions have quit using IE except me: still hoping the day will come that you guys will get out of your imaginary "wana be gods" bubble and start contributing code to open source community. I spent/wasted at least hundreds of hours collecting data for IE team since 2008 and submitted the MOST painful issues: say whenever two people are complaining about IE, I am collecting information and reporting all the facts on Connect. What I got back in return was "Won't Fix", "Non Reproducible" and similar *canned* remarks.

    As I am typing this comment in this little box on IE11 (all updates applied till date on Windows 8.1 pro), Ctrl+Z is not undoing actions at THIS very line!

    Having said that, I am thrilled to have ASM.js on IE. But IE team is still nowhere near to win my heart. I am a TRUE tech fan, but I get to admit that IE team really need to mend their attitude by not treating us like garbage.

  28. owais says:

    Thanks for this nice article. Keep it up. ๐Ÿ™‚

    alquranonlinelearning

  29. noname says:

    XSS(ใ‚ฏใƒญใ‚นใ‚ตใ‚คใƒˆใ‚นใ‚ฏใƒชใƒ—ใƒ†ใ‚ฃใƒณใ‚ฐ)้–ข้€ฃใฎใƒ‘ใƒƒใƒใ€ใพใ ใงใ™ใ‹๏ฝž๏ผŸ

    ใ„ใคใพใงๆ”พ็ฝฎใ™ใ‚‹ใฎใงใ—ใ‚‡ใ†ใ‹ใ€‚ใใ‚Œใจใ‚‚ๆฅๆœˆใฎๆœˆไพ‹ใƒ‘ใƒƒใƒใซใชใ‚Šใพใ™ใ‹ใ€‚

    ๆ—ฉใ‚ใซๅฏพๅฟœใ—ใฆไธ‹ใ•ใ„ใ€‚ๆฅๆœˆใ“ใใฏไธๅ…ทๅˆ็„กใ„ใ‚ˆใ†ใซใŠใญใŒใ„ใ—ใพใ™ใ‚ˆใ€‚

    ๆฏŽๆœˆไฝ•ใ‹ใƒˆใƒฉใƒ–ใƒซใ‚’่ตทใ“ใ—ใฆใ„ใ‚‹ใ‚ขใƒƒใƒ—ใƒ‡ใƒผใƒˆใ€ใ„ใ„ๅŠ ๆธ›ใ†ใ‚“ใ–ใ‚Šใ—ใพใ—ใŸใ€‚

  30. Mitch 74 says:

    I never thought I'd say it here. Not after years of seeing my hopes of Web Development made easy by inconsistent behaviours, disparaging comments to competitors (much less so lately), outright perversion of standards… But, here, I'll have to say it: WELL DONE IE TEAM!

  31. Mike says:

    JavaScript is assembly code after all… great news… a stepping stone to a better future

  32. Spencer says:

    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

  33. Samsung galaxy says:

    Shamim90

    )24@gmail.com