V8 Engine

Inside V8 Engine

Interpreters:

Reads the js code line by line and converts to binary code and provides the result.

Cons: Execution time for repeated code will be longer.

Compilers:

Reads the entire code in the js file and converts to another language and provides the result.

Pros: Less execution time is taken for the repeated code execution.

Inside V8 Engine

V8 Engine = Interpreter + Compiler = JIT (Just in Time) Compiler

Last updated