The first JavaScript engine was created by
Brendan Eich in 1995 for the
Netscape Navigator web browser. (This evolved into the
SpiderMonkey engine, still used by the
Firefox browser.)
Google debuted its
Chrome browser in 2008, introducing the
V8 JavaScript engine that was at the time much faster than its competition. This sparked a race between browser vendors to deliver ever-faster JavaScript engines. 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.
Mozilla followed suit in August 2008 with TraceMonkey, the first JIT compiler for SpiderMonkey engine, released in Firefox 3.1.
Opera joined the performance race with their register-bytecode based and JIT-enabled
Carakan engine, announced in February 2009 Microsoft's first JIT-enabled
Chakra engine, in development since 2008, 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. 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. JavaScriptCore today has a similar 4-tier architecture, 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. 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. 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. Eventually asm.js and
NaCl (a competing Google's technology) evolved into
WebAssembly standard in 2017, with all major engines adding support for it. Nashorn engine was dropped from OpenJDK over a similar concern about ECMAScript's rapid development. == List ==