Sigurd Schneider

Sigurd Schneider

Software Engineer at Google


Inside V8: weak collections, ephemerons, and private fields


This talk explores the implementation and performance characteristics of weak collections (WeakMap, WeakSet, WeakRefs) in V8, the JavaScript engine that powers Chrome and Node.js. The entries of weak collections have ephemeron semantics: an entry is cleared automatically once the key of the entry is no longer referenced anywhere else. This feature makes weak collections one option for implementing private fields. This talk explains what JavaScript weak collections are, and when to use them. We will also explore private fields, how they behave, and how they can be polyfilled with weak collections. Finally, we'll discuss performance and memory challenges for weak collections in the V8 JavaScript engine.

About Sigurd

Munich, Germany

Sigurd Schneider is a V8 core team developer with a background in programming languages and a PhD in compiler verification.

Stay up to date

Get the all the updates directly to your mailbox!