Browser & Frontend Runtime
V8 internals: multiple-choice review
Six questions that cut across the whole unit. Each one is a decision you make reading a real performance trace — not a definition to recite, but a mechanism to reason about under production load.
Confirm you can connect hidden-class shape, IC state, tier promotion, deopt behaviour, and GC barriers — the synthesis the individual lessons built toward.
A hot render function ran at 5µs in tests but 250µs in production. A heap snapshot shows objects reaching one property-access site come from 7 distinct constructors. What is the V8-level cause and the real fix?
Two objects are built as {x:1, y:2} and {y:2, x:1}. A function reads .x on both in a hot loop. What IC state does that access site reach, and why?
Why does V8 ship four JIT tiers (Ignition, Sparkplug, Maglev, TurboFan) instead of one good optimiser?
A perf-critical function shows repeated 'optimized' then 'deoptimized (not a Smi)' pairs in --trace-deopt within the same second. What is happening, and what is the highest-leverage fix?
Why does Orinoco's concurrent marking need a write barrier, and what breaks without one?
A numeric-heavy animation loop processing 10M entities per frame keeps drifting off 60fps as it warms up, with deopts on arithmetic and rising minor-GC frequency. Which data layout fixes both the IC and GC problems at once?
The unit’s through-line is one chain: property-addition order sets the hidden class, the hidden class sets the IC state, the IC state (with type stability) decides whether a function climbs to TurboFan or deopt-loops, and Orinoco’s barriers keep the heap correct while all of this churns. Every production regression in the unit — megamorphic render paths, Smi-overflow deopt-loops, closure leaks into old gen — resolves back to the same lever: stabilise the shape and the numeric type upstream, in the data model, before reaching for any flag.