4 ms·
They did! "Node.js on ChakraCore" [0] already exists. It is maintained by Microsoft, but lives under the NodeJS organization on GitHub. Instead of reimplementi
by Cu3PO42 8y ago
They did!
"Node.js on ChakraCore" [0] already exists. It is maintained by Microsoft, but lives under the NodeJS organization on GitHub. Instead of reimplementing the Node APIs, they roughly implemented the V8 API layer on top of Chakra (which they call chakrashim) to enable "normal" Node to run. I believe the original use case was to run Node on Windows IoT, but I can't seem to find a source on that currently.
A very cool feature that is enabled by ChakraCore is time travel debugging (i.e. the ability to go backwards when stepping through code), which has worked very well for me so far.
In terms of performance, it does not appear to perform better (or just as good as) V8. The most recent benchmarks I could find are roughly one year old, but have Chakra consistently performing worse than what was at the time a recent V8 version [1].
It would be interesting to see how memory usage compares. MS has benchmarks to compare different engines for Node in the repository, however I am currently not able to run those. Maybe someone can provide current insight?
If you are interested in just testing it out, you can get Node versions built on Chakra from nvs and potentially other Node version managers (see [0]).
[0] https://github.com/nodejs/node-chakracore https://github.com/nodejs/node-chakracore
[1] https://sqreen.github.io/node_engine_bench/?q=eyJ0ZXN0cyI6WyIuL3Rlc3RzL2FjY2Vzcy1ub24tZXhpc3RlbnQtYXJndW1lbnRzLWluZGV4LmpzIl0sInZlcnNpb25zIjpbIjYuMTAuMV92OCIsIjcuMTAuMF92OCIsIjcuMTAuMF92OF90dXJib19pZ25pdGlvbiIsIjguMC4wX3Y4IiwiOC4wLjBfdjhfdHVyYm9faWduaXRpb24iLCI4LjAuMC1uaWdodGx5MjAxNzA0MTUyNjVmYzBiZWRjX2NoYWtyYSIsIjguMC4wLW5pZ2h0bHkyMDE3MDUwNWZlNDRmNTQ5NDlfY2hha3JhIl19 https://sqreen.github.io/node_engine_bench/?q=eyJ0ZXN0cyI6Wy...