V8
Google's open-source JavaScript engine, used by Chrome and Node.js to parse, compile and run JavaScript.
In more detail
V8 reads your source, builds an abstract syntax tree, turns it into bytecode for the Ignition interpreter and compiles frequently used functions into machine code with Sparkplug and TurboFan. It also manages the JavaScript heap and runs garbage collection. Node.js exposes some of its internals through the node:v8 module.
Related terms
- V8 isolate — A separate instance of the V8 engine with its own heap and garbage collector; objects in one isolate cannot be seen from another.
- Node.js — A program that runs JavaScript outside the web browser, used mainly to build servers, command-line tools and back-end services.
- just-in-time compilation — Compiling code into machine code while the program is already running, focusing on the parts that run most often.
- Ignition — V8's interpreter, which turns the abstract syntax tree into bytecode and runs it so code starts quickly.
- TurboFan — V8's optimising compiler, which turns hot functions into fast machine code based on the types it has seen.
- garbage collection — The automatic freeing of memory held by objects that the program can no longer reach.
Taught in
- Runtime Environments: Node.js vs Edge Runtime Choice — Next.js 15 & Modern App Router Architecture
- V8 Engine & JIT Pipeline: Bytecode & Turbofan — Node.js Internals & Backend Services
- Node.js Process Architecture: Memory & Heap Spaces — Node.js Internals & Backend Services
- Event Loop Lifecycle: The Six Phases & libuv uv_run — Node.js Internals & Backend Services
- Microtask Queues: process.nextTick vs Promise Timing — Node.js Internals & Backend Services
- Buffer Fundamentals: Slab Allocator & V8 Memory — Node.js Internals & Backend Services
- Worker Threads: worker_threads & SharedArrayBuffer — Node.js Internals & Backend Services
- Diagnostic Profiling: CPU Profiler & Heap Snapshots — Node.js Internals & Backend Services