JavaScript engine

Last updated

A JavaScript engine is a software component that executes JavaScript code. The first JavaScript engines were mere interpreters, but all relevant modern engines use just-in-time compilation for improved performance. [1]

Contents

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]

Since ECMAScript is the standardized specification of JavaScript, ECMAScript engine is another name for these implementations. With the advent of WebAssembly, some engines can also execute this code in the same sandbox as regular JavaScript code. [4] [3]

History

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, with the V8 JavaScript engine that was faster than its competition. [7] [8] The key innovation was just-in-time compilation (JIT), which Mozilla had also been working on for SpiderMonkey. [9] Because of V8's performance, the other browser vendors needed to overhaul their engines for JIT. [10] Apple developed the Nitro engine for its Safari browser, which had 30% better performance than its predecessor. [11] Mozilla then leveraged portions of Nitro to improve SpiderMonkey. [12]

Since 2017, these engines have added support for WebAssembly. [4]

Notable engines

Related Research Articles

<span class="mw-page-title-main">JavaScript</span> High-level programming language

JavaScript, often abbreviated as JS, is a programming language and core technology of the Web, alongside HTML and CSS. 99% of websites use JavaScript on the client side for webpage behavior.

A browser engine is a core software component of every major web browser. The primary job of a browser engine is to transform HTML documents and other resources of a web page into an interactive visual representation on a user's device.

ECMAScript is a standard for scripting languages, including JavaScript, JScript, and ActionScript. It is best known as a JavaScript standard intended to ensure the interoperability of web pages across different web browsers. It is standardized by Ecma International in the document ECMA-262.

<span class="mw-page-title-main">SpiderMonkey</span> JavaScript and WebAssembly engine maintained by the Mozilla Foundation

SpiderMonkey is an open-source JavaScript and WebAssembly engine by the Mozilla Foundation.

<span class="mw-page-title-main">Browser wars</span> Competition between web browsing applications for share of worldwide usage

A browser war is a competition for dominance in the usage share of web browsers. The "first browser war" (1995–2001) consisted of Internet Explorer and Netscape Navigator, and the "second browser war" (2004-2017) between Internet Explorer, Firefox, and Google Chrome.

WebKit is a browser engine primarily used in Apple's Safari web browser, as well as all web browsers on iOS and iPadOS. WebKit is also used by the PlayStation consoles starting with the PS3, the Tizen mobile operating systems, the Amazon Kindle e-book reader, Nintendo consoles starting with the 3DS Internet Browser, and the discontinued BlackBerry Browser.

This is a comparison of both historical and current web browsers based on developer, engine, platform(s), releases, license, and cost.

Netscape Plugin Application Programming Interface (NPAPI) is a deprecated application programming interface (API) for web browser plugins, initially developed for Netscape Navigator 2.0 in 1995 and subsequently adopted by other browsers.

ECMAScript for XML (E4X) was an extension to ECMAScript to add native support for XML. The goal was to provide a simpler alternative to the DOM interface for accessing XML documents. E4X added XML as a primitive data structure to allow for faster access and better support within the language.

Tamarin is a discontinued free software virtual machine with just-in-time compilation (JIT) support intended to implement the 4th edition of the ECMAScript (ES4) language standard. Tamarin source code originates from ActionScript Virtual Machine 2 (AVM2) developed by Adobe Systems, as introduced within Adobe Flash Player 9, which implements ActionScript 3 scripting language. ActionScript Virtual Machine 2 was donated as open-source to Mozilla Foundation on November 7, 2006, to develop Tamarin as a high-performance virtual machine, with the support from broad Mozilla community, to be used by Mozilla and Adobe Systems in the next generation of their JavaScript and ActionScript engines with the ultimate aim to unify the scripting languages across web browsers and Adobe Flash platform and ease the development of better performing rich web applications.

<span class="mw-page-title-main">Web development tools</span> Software used to test the UI of a website or web application

Web development tools allow web developers to test, modify and debug their websites. They are different from website builders and integrated development environments (IDEs) in that they do not assist in the direct creation of a webpage, rather they are tools used for testing the user interface of a website or web application.

V8 is a JavaScript and WebAssembly engine developed by Google for its Chrome browser. V8 is free and open-source software that is part of the Chromium project and also used separately in non-browser contexts, notably the Node.js runtime system.

<span class="mw-page-title-main">WebGL</span> JavaScript bindings for OpenGL in web browsers

WebGL is a JavaScript API for rendering interactive 2D and 3D graphics within any compatible web browser without the use of plug-ins. WebGL is fully integrated with other web standards, allowing GPU-accelerated usage of physics, image processing, and effects in the HTML canvas. WebGL elements can be mixed with other HTML elements and composited with other parts of the page or page background.

HTML video is a subject of the HTML specification as the standard way of playing video via the web. Introduced in HTML5, it is designed to partially replace the object element and the previous de facto standard of using the proprietary Adobe Flash plugin, though early adoption was hampered by lack of agreement as to which video coding formats and audio coding formats should be supported in web browsers. As of 2020, HTML video is the only widely supported video playback technology in modern browsers, with the Flash plugin being phased out.

Chakra is a proprietary JScript engine developed by Microsoft. It is used in the Internet Explorer web browser.

A browser speed test is a computer benchmark that scores the performance of a web browser, by measuring the browser's efficiency in completing a predefined list of tasks. In general the testing software is available online, located on a website, where different algorithms are loaded and performed in the browser client. Typical test tasks are rendering and animation, DOM transformations, string operations, mathematical calculations, sorting algorithms, graphic performance tests and memory instructions. Browser speed tests have been used during browser wars to prove superiority of specific web browsers. The popular Acid3 test is no particular speed test but checks browser conformity to web standards.

asm.js is a subset of JavaScript designed to allow computer software written in languages such as C to be run as web applications while maintaining performance characteristics considerably better than standard JavaScript, which is the typical language used for such applications.

<span class="mw-page-title-main">WebAssembly</span> Cross-platform assembly language and bytecode designed for execution in web browsers

WebAssembly (Wasm) defines a portable binary-code format and a corresponding text format for executable programs as well as software interfaces for facilitating communication between such programs and their host environment.

This is a list of articles related to the JavaScript programming language.

References

  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. 1 2 "Documentation · V8". Google. Retrieved 3 March 2024.
  4. 1 2 Nelaturu, Keerthi. "WebAssembly: What's the big deal?". medium.com. Retrieved 3 March 2024.
  5. 1 2 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. "TraceMonkey: JavaScript Lightspeed, Brendan Eich's Blog". Archived from the original on 4 December 2015. Retrieved 22 July 2020.
  10. "Mozilla asks, 'Are we fast yet?'". Wired. Archived from the original on 22 June 2018. Retrieved 18 January 2019.
  11. Safari 5 Released
  12. 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.
  13. Stachowiak, Maciej (9 November 2008). "Companies and Organizations that have contributed to WebKit". WebKit Wiki. Retrieved 13 April 2019.
  14. Belfiore, Joe (15 January 2020), New year, new browser – The new Microsoft Edge is out of preview and now available for download, Microsoft
  15. "Microsoft Edge and Chromium Open Source: Our Intent". Microsoft Edge Team. 6 December 2018. Retrieved 8 December 2018.