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. It was a rudimentary interpreter for the nascent language Eich invented. (This evolved into the SpiderMonkey engine, still used by the Firefox browser.)

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

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 World Wide Web, alongside HTML and CSS. 99% of websites use JavaScript on the client side for webpage behavior, often incorporating third-party libraries. All major web browsers have a dedicated JavaScript engine to execute the code on users' devices.

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.

<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 Navigator. Browser wars continued with the decline of Internet Explorer's market share and the popularity of other browsers, including Firefox, Google Chrome, Safari, Microsoft Edge and Opera.

WebKit is a browser engine developed by Apple and primarily used in its Safari web browser, as well as all web browsers on iOS and iPadOS. WebKit is also used by the PlayStation consoles beginning from the PS3, the Tizen mobile operating systems, the Amazon Kindle e-book reader, Nintendo consoles beginning from the 3DS Internet Browser, and the discontinued BlackBerry Browser. WebKit's C++ application programming interface (API) provides a set of classes to display Web content in windows, and implements browser features such as following links when clicked by the user, managing a back-forward list, and managing a history of pages recently visited.

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 the standard ISO/IEC 22537:2006 programming language extension that adds native XML support to ECMAScript. The goal was to provide an alternative to DOM interfaces that uses a simpler syntax for accessing XML documents. It also offered a new way of making XML visible. Before the release of E4X, XML was always accessed at an object level. E4X instead treated XML as a primitive. This implied faster access, better support, and acceptance as a building block of a program.

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.

<span class="mw-page-title-main">Google Chrome</span> Web browser developed by Google

Google Chrome is a web browser developed by Google. It was first released in 2008 for Microsoft Windows, built with free software components from Apple WebKit and Mozilla Firefox. Versions were later released for Linux, macOS, iOS, and also for Android, where it is the default browser. The browser is also the main component of ChromeOS, where it serves as the platform for web applications.

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.

<span class="mw-page-title-main">Google Chrome Frame</span> Plug-in designed for Internet Explorer based on the open-source Chromium project

Google Chrome Frame was a plug-in designed for Internet Explorer based on the open-source Chromium project, first announced on September 22, 2009. It went stable in September 2010, on the first birthday of the project. It was discontinued on February 25, 2014 and is no longer supported.

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 defines a portable binary-code format and a corresponding text format for executable programs as well as software interfaces for facilitating interactions between such programs and their host environment.

References

  1. Looper, Jen (2015-09-21). "A Guide to JavaScript Engines for Idiots". Telerik Developer Network. Archived from the original on 2018-12-08. Retrieved 2018-12-08.
  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. "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 May 2, 2012. Retrieved June 28, 2010.
  6. Purdy, Kevin (June 11, 2009). "Lifehacker Speed Tests: Safari 4, Chrome 2". Lifehacker . Archived from the original on April 14, 2021. Retrieved May 8, 2021.
  7. "TraceMonkey: JavaScript Lightspeed, Brendan Eich's Blog". Archived from the original on December 4, 2015. Retrieved July 22, 2020.
  8. "Mozilla asks, 'Are we fast yet?'". Wired. Archived from the original on June 22, 2018. Retrieved January 18, 2019.
  9. Safari 5 Released
  10. Shankland, Stephen (2010-03-02). "Opera 10.5 brings new JavaScript engine". CNET. CBS Interactive. Archived from the original on 2013-10-03. Retrieved 2012-01-30.
  11. Stachowiak, Maciej (November 9, 2008). "Companies and Organizations that have contributed to WebKit". WebKit Wiki. Retrieved April 13, 2019.
  12. Belfiore, Joe (2020-01-15), New year, new browser – The new Microsoft Edge is out of preview and now available for download, Microsoft
  13. "Microsoft Edge and Chromium Open Source: Our Intent". Microsoft Edge Team. 6 December 2018. Retrieved 8 December 2018.