Go 1.24's Swiss Table Map: A Visual Guide to the New Internals

How Swiss tables work in Go built-in map

Go 1.24's Swiss Table Map: A Visual Guide to the New Internals

Go 1.24 replaced its map implementation with Swiss Tables, a design that speeds up lookups using SIMD and clever control bytes. This article explains the new internals visually, from the runtime Map struct to groups, control words, and the table structure that manages multiple groups. Learn how H1 and H2 hash bits guide key placement and lookup, and how the map grows and handles deletions.

Go uses SIMD instructions to compare H2 42 with those 8 control bytes at the same time.
  1. nasso_dev

    swiss tables were invented by engineers working at google's zurich office, hence the name

    im surprised that go, a programming language also from google, wasn't using them!

    for an excellent talk on the development of swiss tables i highly recommend this talk by Matt Kulukundis at CppCon 2017: "Designing a fast, efficient, cache-friendly hash table, step by step"

    https://youtu.be/ncHmEUmJZf4

More from this day

2026-09-05