V8 internals for JavaScript developers
summary
Explains how V8 classifies arrays into packed vs holy arrays, how element kinds transition only downward (SMI → double → object) and how single values like -0, NaN or a string force costly transitions; shows that Chrome 59/61/64 add progressively finer TurboFan/Ignition optimizations. Gives concrete rules: avoid creating holes, avoid reading past length, prefer rest params over arguments, or convert array‑likes to real arrays. Demonstrates using a debug build and d8 with %DebugPrint to inspect an array’s elements kind.
AI-written summary · about
chapters (13)
- 0:00Introduction
- 0:55Properties
- 1:39Array
- 3:26Elements
- 4:08Holes
- 5:15Example
- 7:48Holy Array
- 8:38Elements kinds
- 14:03Array literal
- 14:42Array loops
- 18:42Array like objects
- 22:50Recap
- 23:43Arrays
related talks
30mV8 internals for JS developers
23mV8 Internals for JS Developers
24mDemystifying V8 and JavaScript Performance
27mThe Life of a JavaScript Feature in V8 ft. TypedArrays
33mJavaScript: The V8 Engine optimization tips (...)
23mJoin the super secret V8 club & become a JavaScriptbender
39mAlgorithms in the Front End: from V8 to VDOM
22mHigh Performance JS in V8
