Section 02 of 05
How V8, the event loop, and memory really behave
V8’s optimization pipeline, the event loop, memory, and the engine output that lets you check a claim about them instead of repeating it.
Most performance advice is repeated rather than checked, and the half of it that was once true has usually expired. These articles run the code, name the engine version, and quote the output. Where something could not be observed, the prose says so.
- Articles
- 4
- Latest
- Series
- 2
- №04
The V8 object modelFour Maps Is Polymorphic. Five Is Not.
Monomorphic, polymorphic and megamorphic are counted states with a threshold of four. Here is the transition log, the V8 line that decides it, and the cost.
- №03
The V8 object modelObject Shapes Are a Tree, and the Tree Is Shared
A hidden class is a node in a transition tree V8 keeps for the whole isolate — which is why an unrelated function can decide how your object is stored.
- №02
Async machineryThe Event Loop You Think You Know
Microtasks, rendering opportunities and starvation — what the loop actually does between your callbacks, in the browser and in Node.
- №01
The V8 object modelHow V8 Decides to Optimize Your Function
Two functions that look identical can run at very different speeds. The difference is usually shapes, inline caches, and a deoptimization you never saw.
Browse
Other sections
- Language internals5 articles
- Ecosystem and production4 articles
- Frameworks3 articles
- Tooling and build3 articles