JavaScript engine

From Wikipedia, the free encyclopedia

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]

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[edit]

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[edit]

References[edit]

  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. ^ 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. ^ "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.