Skip to content
Opensource internals
  • Posts

Maps

Go's Maps Are Swiss Tables: Groups of 8 Slots, Match Bytes and a Tombstone

Oct 21, 2026 23 min read Jay Hubbert

Go maps are Swiss tables: groups of eight slots with a control word of match bytes, a 7/8 load factor, tombstones instead of empty slots on delete, and incremental growth through a …

GoInternalsMapsHash tablePerformance

Read more →

How Go Hashes Map Keys: AES-NI, wyhash and the Seed

Oct 21, 2026 16 min read Jay Hubbert

Map keys are hashed with AESENC on amd64 and arm64 and a wyhash-style fallback elsewhere, with a per-process key XORed with a per-map random seed that is regenerated when a map …

GoInternalsHashingMapsAES

Read more →

Why Go Randomizes Map Iteration: The Attack It Prevents

Oct 21, 2026 14 min read Jay Hubbert

Map iteration picks two random offsets at start-up - one in the table directory, one in the slot space - and every map gets a random hash seed, which together defeat hash-flooding …

GoInternalsRuntimeMapsSecurity

Read more →

© 2026 Jay Hubbert · Built with Hugo 0.168.0

RSS ·