Notes and resources related to V8 and thus Node.js performance.
Table of Contents generated with DocToc
- V8 source and documentation
The V8 compiler document outlines the V8 compiler pipeline including the Ignition Interpreter and TurboFan optimizing compiler. It explains how information about your code is executed to allow optimizations, how and when deoptimizations occur and how features like the CodeStubAssembler allowed reducing performance bottlenecks found in the older pipeline.
The V8 garbage collector document talks about how memory is organized on the V8 heap, how garbage collection is performed and how it was parallelized as much as possible to avoid pausing the main thread more than necessary.
Inspection and Performance Profiling
Inside the inspection document you will find techniques that allow you to profile your Node.js or web app, how to produce flamegraphs and what flags and tools are available to gain an insight into operations of V8 itself.
Snapshots and Code Caching
This document includes information as to how V8 uses caching techniques in order to avoid recompiling scripts during initialization and thus achieve faster startup times.
V8 source and documentation
It's best to dig into the source to confirm assumptions about V8 performance first hand.
Documented V8 source code for specific versions of Node.js can be found on the v8docs page.