6 ms·
Enumerating and analyzing 40 non-V8 JavaScript implementations
- soylentgraham 5y agoOddly missing the embedded-in-windows Chakra? (And chakracore)
- chrismorgan 5y agoI am astonished at the omission of ChakraCore, open sourced by Microsoft as what Edge used to use, but sadly abandoned by them after they switched Edge to Chromium: https://github.com/chakra-core/ChakraCore https://github.com/chakra-core/ChakraCore. But it looks like it’s still chugging along as a community effort rather than being completely abandoned. ChakraCore is definitely one of the most notable and significant implementations after the big three.
- eatonphil 5y agoIt was on my list but missed getting into the post by accident. It will be up shortly!
- amelius 5y agoIt would be nice to see some benchmarks.
- AtlasBarfed 5y agoBenchmarks for a competent JS that does loop analysis, code emission, and the attendant warmup/dynamic compiling is tough. It's why Java JVMs are endlessly debated on performance vs compiled languages, fairly or not.
- ysleepy 5y agoI would be interested in some spec test suite coverage figures. I have used a few js engines in the past (nashorn, rhino, otto) and all had problems with missing edge cases in the APIs or really weird quirks in the interop with the host environment. https://github.com/tc39/test262 https://github.com/tc39/test262 is the ecma test suite. rhino for example has extensive gaps: https://github.com/mozilla/rhino/blob/master/testsrc/test262.properties https://github.com/mozilla/rhino/blob/master/testsrc/test262... It is really frustrating that in the end, there aren't really that many actually compliant implementations. Especially implementing the exact regex behaviour. EDIT: apparently this exists, at least partially: https://kangax.github.io/compat-table/es6/ https://kangax.github.io/compat-table/es6/ The smaller engines are missing however.
- AtlasBarfed 5y agoI can't imagine writing an interpreter for JS that handles all its autoconversion foibles, and now with several more generations of ECMAScript version features piled on (generally for the better), that's a lot more to handle. And then have to do all the type inferencing to try to get performance, and then the dynamic compiling...
- MauranKilom 5y agoInteresting to see a JS implementation written in JS: https://github.com/engine262/engine262/ https://github.com/engine262/engine262/ (The readme explains what the point of it is.)
- jcelerier 5y agoQt's ES7 js engine has always been solid for me: https://doc.qt.io/qt-5/qjsengine.html https://doc.qt.io/qt-5/qjsengine.html ; it used to use V8 but they rewrote it to be better optimized for Qt's needs AFAIK.
- eatonphil 5y agoQt switched so many times I had a hard time following. I didn't want to include every different branch when I did know they were using V8 for a while. I'll still probably leave them out of this post but totally fair to bring them up.
- jcelerier 5y agoThere were only two switches afaik. The current engine has been used since 2013 (https://www.qt.io/blog/2013/04/15/evolution-of-the-qml-engine-part-1 https://www.qt.io/blog/2013/04/15/evolution-of-the-qml-engin...), this is likely longer than some of the other engines mentioned on your page did exist
- eatonphil 5y agoOk sweet I see now. They used JavaScriptCore until 2011 or so, switched to V8 until 2013, and have been using their own implementation, q4, since then. The source code seems to be here: https://github.com/qt/qtdeclarative/tree/dev/src/qml/jsruntime https://github.com/qt/qtdeclarative/tree/dev/src/qml/jsrunti.... Thanks! Will add and be live shortly.
- fowl2 5y agoAlso missing is jint, an interpreter in C# https://github.com/sebastienros/jint https://github.com/sebastienros/jint
- eatonphil 5y agoThanks! Adding and will be live shortly.
- VWWHFSfQ 5y agoI've often wondered why nginx decided to implement their own njs Javascript instead of just embracing lua/luajit which already has a very healthy ecosystem in nginx and, as far as I know, is still orders of magnitude faster than even the fastest Javascript implementations.
- masklinn 5y agoAccording to Igor Sysoev’s 2015 presentation, they disliked Lua’s divergences from the C-style (e.g. begin/end, 1-indexing) as well as the “non-standard” syntax for regex (which would be pretty important for scripting nginx). And while he acknowledged that javascript has its own oddities, as far as he was concerned people are used to those from their use in other contexts. If you want to watch the entire thing, it’s “A new and powerful way to configure nginx” on youtube.
- mirekrusin 5y agoThere really doesn't exist js engine on top of lua or implemented in ocaml?
- dblohm7 5y agoAny chance you could add a link for SpiderMonkey? It has its own site now: https://spidermonkey.dev/ https://spidermonkey.dev/
- mras0 5y agoI made a toy ECMAScript interpreter a couple of years ago: https://github.com/mras0/mjs https://github.com/mras0/mjs Not really notable, expect perhaps being the only one on the list with an ES1 mode? :) (Can't promise it's accurate though, as it was hard to find examples). Otherwise pretty boring (C++, hand-written parser, AST interpreter, ES1/ES3/ES5.1 support minus some regexp/timezone/locale stuff).
- eyelidlessness 5y agoSince AssemblyScript counts, I’ll also mention Static TypeScript[1], which I just discovered yesterday. It’s also a subset of TS, which compiles to native machine code. 1: https://makecode.com/language#static-typescript https://makecode.com/language#static-typescript
- eatonphil 5y agoAh thanks for the reminder. That could go into the research section too. Will add shortly. Thanks!
- fifilura 5y agoThe article describes a list of engines to embed, so this falls out of scope. But I still wanted to highlight Opera's Carakan engine which was developed in head-to-head competition with V8 when Opera was still maintaining their own engine. https://en.wikipedia.org/wiki/Presto_(browser_engine)#ECMAScript_engines https://en.wikipedia.org/wiki/Presto_(browser_engine)#ECMASc...
- CharlesW 5y agoModdable's XS JavaScript engine is great for low-resource microcontrollers, with 99%+ conformance to the 2020 JavaScript language standard. It's built by a brilliant team of ex-QuickTime and ex-Apple Media Tool engineers. https://www.moddable.com/faq.php#what-is-xs https://www.moddable.com/faq.php#what-is-xs