Microsoft says Node+ChakraCore is faster than Node+V8

Jan 20, 2016 22:01 GMT  ·  By

Microsoft has submitted an official "pull request" (term used on GitHub for merging two pieces of code) to the Node.js project, through which it's asking the project's maintainers to enable support for ChakraCore, the JavaScript engine packed inside Microsoft's Edge browser.

Since its creation, Node.js has always run on Google's V8 JavaScript engine, and it did so very successfully, managing to conquer the Web server world, providing a more adequate solution for running real-time applications, something which neither Apache, nginx, Tomcat, or other server technologies were never that good at.

The Node.js community blossomed, and as time went by and as Node became more and more of a hot topic in the programming community, bigger companies like PayPal, Yahoo, IBM and others, quickly flocked to join.

Microsoft was one of Node's early supporters

One of Node.js' earliest adopters was Microsoft. But while Microsoft started embracing the open-source community more and more, the company also developed a new browser, all from the ground up, on top of a new layout engine named EdgeHTML and a new JavaScript engine called Chakra.

This new browser would be first named Spartan, then rebranded as Edge, and would eventually become the default browser in Windows 10, replacing the much-hated Internet Explorer.

Last December, Microsoft went a step further than it ever did, and released the core of the Chakra engine, ChakraCore, as open source. Microsoft never released the source code of a core product like Edge to open source before, and this signaled the start of a new approach towards open source from Microsoft's side.

Microsoft experimented with a Node+Chakra setup before

Last week the company officially published ChakraCore's code on GitHub. Without wasting too much time, yesterday, Microsoft also submitted a pull request to the Node.js project and requested Node's team to allow developers to replace V8 with ChakraCore if they wished to.

For this, the company ran some tests in May and is confident it will work out just fine. Additionally, the Chakra developers also created a library called chakrashim, which will automatically convert API calls from existing applications meant to run on V8, to the proper API calls specific for Chakra.

Node.js architecture, with V8 and ChakraCore
Node.js architecture, with V8 and ChakraCore

Approving the pull request may take some time since all the code needs to be manually reviewed, but the chances are high that the Node.js team will adopt this change.

Before this pull request, there were articles that encouraged the Node team to decouple the project from its V8 dependency and allow it to use any JavaScript engine developers wanted.

Node community already started decoupling V8 from Node's core

In preparation for this chance, the Node team has been pushing developers to write applications on top of the new API called Native Abstractions for Node.js, which makes sure to remove any dependencies specific to V8 and its multiple (breaking) versions.

The push to get ChakraCore into Node.js has something to do with Microsoft's IoT version of Windows 10, which needs to run on resource-limited machines.

As Samsung found out, Node.js and JavaScript are better at dealing with lower resources than any other platforms.

If we take into account that Microsoft's Senior Director of Open Source Programs, Gianugo Rabellino, is also the Secretary of the Board on the Node.js Foundation Board of Directors, the Node.js community already seems to trust Microsoft and won't look at this pull request as an invasion from Evil Corp. Also, some stellar benchmarks will also help Microsoft's cause.

Node.js Benchmark performance
Node.js Benchmark performance

Photo Gallery (3 Images)

Microsoft officially asks Node.js to add ChakraCore support
Node.js architecture, with V8 and ChakraCoreNode.js Benchmark performance
Open gallery