A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.geeksforgeeks.org/javascript/what-happens-inside-javascript-engine/ below:

What happens inside JavaScript Engine ?

What happens inside JavaScript Engine ?

Last Updated : 25 Nov, 2021

JavaScript is a multi-paradigm prototype-based language, which uses JavaScript Engine such as Chrome's V8 engine Firefox SpiderMonkey engine and etc. They convert the high level code into machine-readable code which lets computer to perform some specific tasks. We will understand this using an image.
 


Google chrome's JavaScript V8 engine: Firstly, raw JavaScript file goes into the Parser

javascript
// Arrow function
const multiply = (a, b)=> a*b;

for(let i=0;i<1000;i++){
    console.log(multiply(4, 3));
}


Mozilla's SpiderMonkey JavaScript Engine: SpiderMonkey is the first Engine created by Brendan Eich, Creator of JavaScript. He created this Engine at Netscape Communication in 1995 and now it is maintained by Mozilla Foundation. We will understand this using an image. 


The Spider Monkey converts the main JS code into the byte code through the compiler, after that the byte code goes into two section Interpreter and JIT Compiler.
Mozilla's SpiderMonkey Engine three things are important which are as follows: 


Difference between Chrome V8 vs Mozilla's Spider Monkey: The main difference between chrome's V8 Engine and Mozilla's SpiderMonkey lies in ECMAScript conformance Test262 which is used to check how closely JavaScript implementation follows the ECMAScript 5th edition specification standards, created by ECMA International. This test consists of thousands of individual tests, which checks the requirement of the specification.
Conformance test: 

Chrome's V8 Engine -> 98%

Mozilla's SpiderMonkey -> 87%



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4