Jump to content

List of JavaScript engines

From Wikipedia, the free encyclopedia
(Redirected from JavaScript engine)

The first engines for JavaScript were mere interpreters of the source code, but all relevant modern engines use just-in-time compilation for improved performance.[1] JavaScript engines are typically developed by web browser vendors, and every major browser has one. In a browser, the JavaScript engine runs in concert with the rendering engine via the Document Object Model and Web IDL bindings.[2] However, the use of JavaScript engines is not limited to browsers; for example, the V8 engine is a core component of the Node.js runtime system.[3] They are also called ECMAScript engines, after the official name of the specification. With the advent of WebAssembly, some engines can also execute this code in the same sandbox as regular JavaScript code.[4][3]

History

[edit]

The first JavaScript engine was created by Brendan Eich in 1995 for the Netscape Navigator web browser.[5] It was a rudimentary interpreter for the nascent language Eich invented.[6] (This evolved into the SpiderMonkey engine, still used by the Firefox browser.[5])

Google debuted its Chrome browser in 2008, introducing the V8 JavaScript engine that was at the time much faster than its competition.[7][8] This sparked a race between browser vendors to deliver faster and faster JavaScript engines.[9] The key innovations around this era were switching from basic tree-walking interpreters to stack- and register-based bytecode VM interpreters, just-in-time compilation (JIT) and generational GC. Apple released the JIT-enabled Nitro engine in June 2008 for its Safari browser, which had 30% better performance than its predecessor.[10][11] Mozilla followed the suit in August 2008 with TraceMonkey, the first JIT compiler for SpiderMonkey engine, first released in Firefox 3.1.[12]

Further performance gains in major JavaScript engines were later achieved with the introduction of multi-tiered JIT architectures. Progressively advanced JIT compilers are used to optimize hotspots in user code, with each next tier delivering ever more performant native code at the cost of slower compile time. Chrome was the first to implement it in V8 in 2010 with the introduction of Crankshaft, a 2-tiered JIT compiler.[13] By 2023, architecture of V8 evolved into 4 tiers: Ignition – register-based bytecode interpreter, Sparkplug – a fast non-optimizing JIT compiler, Maglev and TurboFan – slower optimizing JIT compilers.[14] The ever-increasing complexity of JIT compilers, however, has also been criticized as a rich source of browser bugs, prompting some browser vendors to disable JIT altogether, such as Microsoft Edge's "Super Duper Secure Mode", introduced in 2021 and reportedly with minor performance impact for daily browsing.[15]

Taking advantage of performance improvements in JavaScript engines, Emscripten LLVM-to-JavaScript compiler appeared in 2010-2011 and allowed running existing C/C++ code, such as game engines, directly in the browser. asm.js, a highly optimizable low-level subset of JavaScript for such compilers emerged in 2013, with Firefox being the first to implement specific optimizations for it. Eventually asm.js and NaCl (a competing Google's technology) evolved into WebAssembly standard in 2017, with all major engines adding support for it.[4]

List

[edit]
Engine License Standard JIT WASM Description
V8 BSD-3-Clause ES2024+ Yes Yes JavaScript engine of Google Chrome and Chromium/Blink-based browsers, such as Microsoft Edge. Also used in Node.js and Deno runtimes, Electron framework and numerous other projects. Currently has a register-based bytecode interpreter (Ignition) and three tiers of JIT compilers (Sparkplug, Maglev and Turbofan).
SpiderMonkey MPL-2.0 ES2024+ Yes Yes JavaScript engine of Firefox and other Mozilla Gecko applications. The engine currently includes the IonMonkey compiler and OdinMonkey optimization module, has previously included the TraceMonkey compiler (first JavaScript JIT) and JägerMonkey.
JavaScriptCore LGPL v2 ES2024+ Yes Yes JavaScript engine of Safari and WebKit-based browsers. Also used in Bun runtime. Originally, a fork of KJS engine. In 2008 the engine was rewritten to use a register-based bytecode interpreter, codenamed SquirrelFish and shortly after a basic JIT compiler was implemented under the name SquirrelFish Extreme (Nitro in Apple's marketing terms.)[16] Two more tiers of optimizing JIT compilers were added later, DFG and FTL engines.
KJS LGPL v2 ES5 No No The engine originally used in Konqueror, and one component of KHTML, a predecessor to JavaScriptCore. Originally an AST-tree-walking interpreter, upgraded to a bytecode interpreter (FrostByte) in 2008.[17] Development largely stopped as Konqueror transitioned from KHTML first to QtWebKit (JavaScriptCore) and then QtWebEngine (V8). KDE Plasma 6 finally removed KJS/KHTML engine altogether.[18]
JScript Proprietary ES3 No No The engine that is used in Internet Explorer for versions up to IE9, and one component of the MSHTML (Trident) browser engine.
Chakra (JScript9) Proprietary ES5 Yes No A JScript engine used in Internet Explorer. It was first previewed at MIX 10 as part of the Internet Explorer 9 Platform Preview.[19]
ChakraCore MIT ES6 (partial) Yes Yes JavaScript engine of Microsoft Edge Legacy.[20] Open-sourced under the name ChakraCore in 2016. Microsoft discontinued maintenance in 2021, leaving it to the community, but it has received little attention since then.
Linear B Proprietary ES3 No No The ECMAScript engine of the Opera web browser versions 7.0 to 9.50, exclusive.
Futhark Proprietary ES3 No No The ECMAScript engine of the Opera web browser versions 9.50 to 10.10.
Carakan Proprietary ES5 Yes No A JavaScript engine developed by Opera Software ASA, included in the 10.50 release of the Opera web browser, until switching to V8 with Opera 15 (released in 2013).[21][22][23] Featured register-based bytecode and JIT.
Graal.js UPL-1.0 ES2022+ via GraalVM No An ECMAScript compliant JavaScript engine for GraalVM which supports language interoperability that can also execute Node.js applications.
Rhino MPL-2.0 ES6 (partial) No No One of several JavaScript engines from Mozilla, using the Java platform.
Nashorn GPL v2 ES6 (partial) via JVM No A JavaScript engine used in Oracle Java Development Kit (JDK) from Java versions 8-14.[24] Now available as a standalone library which can be used with Java 11 and higher.[25]
JScript .NET Proprietary ES3 via CLR No A .NET Framework JScript engine used in ASP.NET based on Common Language Runtime and COM Interop. Support was dropped with .NET Core and CoreCLR so its future looks questionable for ASP.NET Core.
Hermes MIT ES6+ (partial) No No Developed by Facebook for React Native mobile apps [26], but can also be used independent from React Native. Precompiles JavaScript to optimized bytecode ahead-of-time to improve app start-up time.
Jint BSD-2-Clause ES6+ (partial) No No Javascript interpreter with integrated engine for .NET
JS-Interpreter Apache-2.0 ES5 No No A lightweight JavaScript interpreter implemented in JavaScript with step-by-step execution.
QtScript LGPL/GPL/Qt ES5 No No Originally developed by Trolltech, now owned by The Qt Company. It provides QObject integration with JavaScriptCore.
V4 (QJSEngine) LGPL/GPL/Qt ES2016 Yes No Qt's newer ECMAScript engine, powering QML and QtQuick. ES7/ES2016-compliant[27] and under active development. JIT-enabled using macroassembler code borrowed from JavaScriptCore.[28][29]
Microvium MIT ES6 (partial) No No JavaScript engine for microcontrollers, supporting a restricted subset of the ECMAScript specification, using less than 16 kB of flash memory and 64 B of RAM while idle.[30]
Duktape MIT ES6 (partial) No No A small footprint, easily embeddable ES5/5.1 engine with some features from ES6 and later.[31]
XS LGPL/Apache-2.0 ES2024+ No No An ECMAScript 2024+ compliant engine for microcontrollers with limited resources.[32][33] XS is maintained by Moddable as part of the Moddable SDK and was formerly part of the Kinoma Platform.[34]
Espruino MPL-2.0 ES5 (subset) No No A very small footprint interpreter specifically for microcontrollers. Can run in less than 8 kB of RAM by executing from source (rather than bytecode).
MuJS ISC ES5 No No A lightweight ECMAScript interpreter library, designed for embedding in other software to extend them with scripting capabilities. Originally developed for MuPDF.[35]
mJS Apache-2.0 ES6 (subset) No No Restricted JavaScript engine. Used for Internet of Things (IoT).
JerryScript Apache-2.0 ES6 (partial) No No A lightweight JavaScript engine by Samsung for microcontrollers with less than 64 KB RAM.
njs BSD-2-Clause ES6 (partial) No No A lightweight JavaScript interpreter optimized for web server scripting and fastest VM context creation; used in nginx.[36]
QuickJS MIT ES2023+ No No A lightweight ECMAScript engine by Fabrice Bellard and Charlie Gordon, currently featuring almost complete support of ES2023. Implements a single-pass AST-free direct to bytecode compiler and a stack-based interpreter. Can precompile .js to bytecode ahead-of-time and produce a binary executable with no external dependencies. Used in WinterJS and Amazon's LLRT runtimes.
QuickJS-NG MIT ES2023+ No No A fork of QuickJS focused on community development, cross-platform support and latest available ECMAScript features.
engine262 MIT ES2024+ No No A JavaScript engine written in JavaScript for development and exploration. It is primarily used to validate the ECMAScript specification.
Boa MIT ES2024+ (>90% test262) No No A JavaScript engine written in Rust.[37][38]
Nova MIT ES6+ (partial) No Yes A JavaScript/WebAssembly engine written in Rust, experimenting with a novel cache-friendly data-oriented design for core language data structures.
LibJS BSD-2-Clause ES2024+ (>90% test262) No Yes (LibWASM) JavaScript engine of the SerenityOS and Ladybird projects.[39] Initially it was an AST interpreter, but has been upgraded to a bytecode-based one.[40]
Kiesel MIT ES6+ (partial) No No JavaScript engine by Linus Groh written in Zig.[41][42][43]
Porffor MIT ES6+ (partial) via WASM No JavaScript/TypeScript ahead-of-time compiler that targets WebAssembly instead of bespoke VM bytecode.
Elk AGPL/commercial ES6 (subset) No No Tiny embeddable JavaScript engine for a subset of ES6.
GNU Guile GPL ES3 (partial) No No Features an unfinished ECMAScript interpreter as of version 1.9.
Tamarin MPL-2.0 ES3 Yes No An ActionScript and ECMAScript engine used in Adobe Flash.
Narcissus MPL-2.0 ES5 No No JavaScript implemented in JavaScript (a meta-circular evaluator), intended to run in another JavaScript engine, of theoretical and educational nature only.
iv MIT ES5 Yes No ECMAScript Lexer / Parser / Interpreter / VM / method JIT written in C++.[44]
CL-JavaScript MIT ES5 (partial) via Lisp runtime No Can compile JavaScript to machine language on Common Lisp implementations that compile to machine language.[45]
BESEN LGPL ES5 Yes No A complete JIT-compiling implementation of ECMAScript Fifth Edition written in Object Pascal.[46]
Continuum MIT ES6 (partial) No No A self-interpreter that supports older drafts of the ECMAScript 2015 specification.[47] Uniquely, the engine is implemented in ECMAScript 3, which made it possible to run ES2015 in browsers as old as IE6.[48]
YAJI LGPL ES5 No No An ECMAScript engine based on the FESI implementation by Jean-Marc Lugrin in 1999, using the Java platform, currently being developed to support the latest standards (ECMAScript spec. 262, v5.1).[49][50][51]
Jsish MIT ES5 (partial) No No An ES5.1 subset interpreter with builtin SQLite, JSON, WebSocket, and ZVFS support.[52]
Tiny-JS MIT No No A minimal JavaScript interpreter written in C++.
ScriptEase Proprietary No No An old proprietary engine last updated in 2003. Only notable for its use in the James Webb Space Telescope.[53]
InScript Proprietary No No An obsolete proprietary library used for iCab 2 and 3.
  Discontinued or dead projects

See also

[edit]

References

[edit]
  1. ^ Looper, Jen (21 September 2015). "A Guide to JavaScript Engines for Idiots". Telerik Developer Network. Archived from the original on 8 December 2018. Retrieved 8 December 2018.
  2. ^ "How Blink Works". Google. Retrieved 12 March 2024.
  3. ^ a b "Documentation · V8". Google. Retrieved 3 March 2024.
  4. ^ a b Nelaturu, Keerthi. "WebAssembly: What's the big deal?". medium.com. Retrieved 3 March 2024.
  5. ^ a b Eich, Brendan (21 June 2011). "New JavaScript Engine Module Owner".
  6. ^ Fin JS (17 June 2016), "Brendan Eich – CEO of Brave", YouTube, retrieved 7 February 2018
  7. ^ "Big browser comparison test: Internet Explorer vs. Firefox, Opera, Safari and Chrome". PC Games Hardware. Computec Media AG. 3 July 2009. Archived from the original on 2 May 2012. Retrieved 28 June 2010.
  8. ^ Purdy, Kevin (11 June 2009). "Lifehacker Speed Tests: Safari 4, Chrome 2". Lifehacker. Archived from the original on 14 April 2021. Retrieved 8 May 2021.
  9. ^ "Mozilla asks, 'Are we fast yet?'". Wired. Archived from the original on 22 June 2018. Retrieved 18 January 2019.
  10. ^ Safari 5 Released
  11. ^ Shankland, Stephen (2 March 2010). "Opera 10.5 brings new JavaScript engine". CNET. CBS Interactive. Archived from the original on 3 October 2013. Retrieved 30 January 2012.
  12. ^ "TraceMonkey: JavaScript Lightspeed, Brendan Eich's Blog". Archived from the original on 4 December 2015. Retrieved 22 July 2020.
  13. ^ "A New Crankshaft for V8". Chromium Blog. 7 December 2010. Retrieved 22 April 2011.
  14. ^ https://v8.dev/blog/maglev
  15. ^ https://microsoftedge.github.io/edgevr/posts/Super-Duper-Secure-Mode/
  16. ^ "JavaScriptCore – WebKit".
  17. ^ https://blogs.kde.org/2008/05/22/news-land-konquerors/
  18. ^ https://lwn.net/Articles/963851/
  19. ^ Frequently Asked Questions, Microsoft, 13 March 2010, archived from the original on 22 March 2010, retrieved 18 March 2010
  20. ^ "Targeting Edge vs. Legacy Engines in JsRT APIs". Retrieved 10 September 2015.
  21. ^ "Carakan". Archived from the original on 31 May 2009. Retrieved 9 July 2009.
  22. ^ "Opera Desktop Team's Blog | Opera". Archived from the original on 3 March 2006.
  23. ^ "Dev.Opera — Blog". dev.opera.com.
  24. ^ "Oracle Nashorn: A Next-Generation JavaScript Engine for the JVM".
  25. ^ "Using Nashorn with different Java versions". GitHub. Retrieved 23 January 2025.
  26. ^ "Using Hermes". Facebook. Retrieved 9 April 2021.
  27. ^ https://doc.qt.io/qt-6/qtqml-javascript-hostenvironment.html
  28. ^ "V4 - Qt Wiki". wiki.qt.io. Retrieved 24 April 2021.
  29. ^ https://wiki.qt.io/Qt-contributors-summit-2013-QML-engine
  30. ^ "Microvium is very small". 11 June 2022. Retrieved 23 August 2022.
  31. ^ "Duktape". Retrieved 21 September 2013.
  32. ^ "moddable/documentation/xs/XS Conformance.md at public". GitHub.
  33. ^ "Apps for IoT". Archived from the original on 28 December 2018.
  34. ^ "Xs7 @ Tc-39".
  35. ^ "MuJS". Retrieved 22 September 2014.
  36. ^ "NGINX JavaScript in Your Web Server Configuration". YouTube. 26 October 2018. Archived from the original on 13 December 2021. Retrieved 30 October 2018.
  37. ^ "Let's build a JavaScript Engine". 2019.jsconf.eu. Retrieved 23 March 2022.
  38. ^ "GitHub - boa-dev/boa: Boa is an embeddable and experimental Javascript engine written in Rust". github.com. Retrieved 8 April 2022.
  39. ^ "LibJS JavaScript engine". libjs.dev. Retrieved 30 June 2023.
  40. ^ "LibJS: Rip out the AST interpreter :^) · LadybirdBrowser/ladybird@2eaa528". GitHub. Retrieved 10 July 2024.
  41. ^ "Kiesel JavaScript Engine". kiesel.dev. Retrieved 9 April 2025.
  42. ^ kiesel-js. "kiesel". Codeberg.org. Retrieved 9 April 2025.
  43. ^ "Linus Groh". linus.dev. Retrieved 18 April 2025.
  44. ^ "Constellation/iv". GitHub. Retrieved 15 November 2015.
  45. ^ "CL-JavaScript". Retrieved 14 September 2018.
  46. ^ "Support me". GitHub. 18 November 2021.
  47. ^ "ECMAScript 2015 Language Specification – ECMA-262 6th Edition".
  48. ^ "An ES6 Virtual Machine Built in JavaScript". Archived from the original on 3 December 2012. Retrieved 1 December 2012.
  49. ^ "ECMAScript Language Specification ECMA-262 5.1 edition" (PDF). Ecma International. June 2011. Archived from the original (PDF) on 12 April 2015. Retrieved 31 January 2012.
  50. ^ "YAJI: Yet Another JavaScript Interpreter". Google Code. Retrieved 31 January 2012.
  51. ^ "FESI". September 2003. Archived from the original on 6 September 2012. Retrieved 6 August 2012.
  52. ^ "Jsish". Retrieved 30 April 2014.
  53. ^ Clark, Mitchell (18 August 2022). "The James Webb Space Telescope runs JavaScript, apparently". The Verge. Retrieved 2 September 2022.