← Talks

PiterJS · 18.06.2026 · 30 minutes

JS Objects Aren’t Free

Hidden classes, inline caches, and dictionary mode. How one line changes the internal model of an object, and what it costs on a hot path.

What we cover

01

Hidden classes

How V8 assigns a hidden shape to an object, and why property order and composition determine its stability.

02

Inline caches

Monomorphic, polymorphic, and megamorphic property access, including what pushes a hot path from the first to the third.

03

Dictionary mode

When an object falls back to a dictionary, which optimizations it loses, and how much more that costs.

04

Practical rules

How to write constructors and hot data structures whose shapes remain stable and optimizable.

Talk materials

Slides, reproducible benchmarks, the recording, and a detailed article. The talk and written article are in Russian.