- V8 — An open-source written in C++, developed by Google.
- Rhino — Developed by Mozilla Foundation in Java, which is completely open-source.
- Chakra — A JScript9 engine developed for Internet Explorer.
- Nashorn — A open-source written by Oracle Java Languages and Tool Group as part of OpenJDK.
- JerryScript — A simple, lightweight yet powerful engine for the Internet of Things.
The key way that the V8 engine differs from the other engines is, it doesn’t produce byte code or any intermediate code.
Two Compilers Of V8 ENGINE
- Full-Codegen — A simple and fast compiler that produces low level and slow machine code.
- Crankshaft — A Just-In-Time complex optimizer come compiler that produces a highly-optimized code.
The V8 Engine Also Uses Several Threads Internally:
- A Profiler thread calls the runtime, when a time-consuming method on execution, so that Crankshaft can optimize them.
- Here some threads are allocated to handle Garbage Collector.
Key Components Of The V8 Engine
- JS interpreter — Ignition and Optimization compiler
- Garbage collection — Old generation sweeper
- Web Assembly — Liftoff
On runtime, the compiled code is analyzed and can be re-compiled for optimal performance. Ignition provides the Turbofan at first and Crankshaft in the second.
JIT compilation results in occupying a large amount of memory to execute machine code, which even may take a while to execute. Whereas Ignition comes as the solution that executes code with less memory overhead.
Unlike other complex generators, Liftoff is a simpler code generator, which generates code for each opcode at a time. It generates machine code much faster than Turbofan even to x10 range.