runtime-internals

Tag

Cards List
#runtime-internals

Go Empty Interface Explained & The Hidden Heap Allocation

Lobsters Hottest ↗ · 2026-10-29 Cached

An in-depth look at the underlying implementation of Go's empty interface (any): the two-pointer structures of eface and iface, the meaning of the type word and data word, and how the compiler avoids unnecessary heap allocations through constants, zeroVal, staticuint64s, and other tricks.

0 favorites 0 likes
← Back to home

Submit Feedback