Top Qs
Timeline
Chat
Perspective

List of JavaScript engines

From Wikipedia, the free encyclopedia

Remove ads

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]

Remove ads

History

Summarize
Perspective

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 ever-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), inline caching (hidden classes) 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, released in Firefox 3.1.[12] Opera joined the performance race with their register-bytecode based and JIT-enabled Carakan engine, announced in February 2009 [13] and released in April 2010.[14] Microsoft's first JIT-enabled Chakra engine, in development since 2008,[15] debuted as part of Internet Explorer 9 in 2011. Its major rewrite appeared in Microsoft Edge Legacy in 2015 and open-sourced as ChakraCore in 2016.

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.[16] 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.[17] JavaScriptCore today has a similar 4-tier architecture,[18] while Firefox's SpiderMonkey and ChakraCore have 3 tiers (interpreter and 2-tiered JIT).[19][20] This ever-increasing complexity of JIT compilers, however, has 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.[21]

V8's influence expanded beyond browsers with the release of Node.js in 2009 and its package manager npm in 2010. As their popularity exploded, V8 also became the engine powering vast amounts of server-side JavaScript code.[22][23] In 2013, Electron framework appeared that let developers create desktop apps with web technologies as well, using Chromium with V8 and Node.js under the hood.[24]

Taking advantage of performance improvements in JavaScript engines, Emscripten C/C++-to-JavaScript compiler appeared in 2010-2011 and allowed running existing complex C/C++ code, such as game engines and even whole virtual machines, 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 with OdinMonkey module.[25] 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]

The six-year gap between ECMAScript 5 (2009) and ES6 (2015) marked a major inflection point for JavaScript engine development. Whereas ES5 was a relatively compact language with straightforward basic implementation, ES6 introduced foundations of modern JavaScript, with substantially increased complexity, as well as an annual release cycle for new specification versions. This put the focus not only on performance optimization, but also on keeping pace with the rapidly evolving standards (of both ECMAScript and wider web ecosystem) and led to a consolidation around engines that had the resources to do it. Many smaller projects did not end up fully implementing ES6 spec, and Opera and Microsoft both ceased developing their engines and adopted V8 in 2013 and 2021.[26][27] Nashorn engine was dropped from OpenJDK over a similar concern about ECMAScript's rapid development.[28]

Remove ads

List

Summarize
Perspective
More information Engine, License ...
  Discontinued or dead projects
Remove ads

See also

References

Loading related searches...

Wikiwand - on

Seamless Wikipedia browsing. On steroids.

Remove ads