---
title: "How Go 1.24’s Swiss Tables saved us hundreds of gigabytes"
description: "Go 1.24's new map implementation, based on Swiss Tables and extendible hashing, cut roughly 500 MiB of live heap (about 1 GiB of RSS with GOGC=100) from a 3.5-million-entry routing cache map, enough to more than offset a separate Go 1.24 mallocgc memory regression."
url: "https://swe.quest/articles/how-go-1-24-s-swiss-tables-saved-us-hundreds-of-gigabytes-4fbf9a0f30e1e4c9"
canonical: "https://www.datadoghq.com/blog/engineering/go-swiss-tables/"
source: "Datadog Engineering"
published: "2025-07-17"
difficulty: "medium"
kind: "Deep dive"
reading_minutes: 17
tags: ["go","data-structures","memory-management","runtimes","performance"]
---

# How Go 1.24’s Swiss Tables saved us hundreds of gigabytes

A post on [Datadog Engineering](https://swe.quest/sources/datadog.md), published 2025-07-17, 17 min read, Deep dive. Original: [https://www.datadoghq.com/blog/engineering/go-swiss-tables/](https://www.datadoghq.com/blog/engineering/go-swiss-tables/)

## Summary

Go 1.24's new map implementation, based on Swiss Tables and extendible hashing, cut roughly 500 MiB of live heap (about 1 GiB of RSS with GOGC=100) from a 3.5-million-entry routing cache map, enough to more than offset a separate Go 1.24 mallocgc memory regression. Go 1.23 maps use 8-slot buckets with overflow chains, a 13/16 maximum load factor, and incremental growth that keeps old bucket arrays alive. Swiss Tables use 8-slot groups with a control word for SIMD-assisted probing, which removes overflow buckets and allows a 7/8 load factor. Extendible hashing caps each table at 1024 slots, so growth is bounded and splits happen per table. The post works through per-entry and per-bucket memory estimates and then applies struct-level optimizations to the map's values for further fleet-wide savings.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Go](https://swe.quest/tags/go.md) (Languages)
- [Data structures](https://swe.quest/tags/data-structures.md) (Architecture & design)
- [Memory management](https://swe.quest/tags/memory-management.md) (Compilers & runtimes)
- [Runtimes & VMs](https://swe.quest/tags/runtimes.md) (Compilers & runtimes)
- [Performance engineering](https://swe.quest/tags/performance.md) (Reliability & operations)

## Prerequisites

- Go maps ([easy posts on Go](https://swe.quest/tags/go.md?difficulty=easy))
- hash tables
- Go heap profiling ([easy posts on Go](https://swe.quest/tags/go.md?difficulty=easy))

## Keywords

Go 1.24, Swiss Tables, extendible hashing, SIMD, GOGC, Datadog

## Related posts

- [How we tracked down a Go 1.24 memory regression across hundreds of pods](https://swe.quest/articles/how-we-tracked-down-a-go-1-24-memory-regression-across-hundreds-of-pods-bbf00972d141a71d.md): Datadog Engineering · 2025-07-17 · Medium · 9 min read · Go, Memory management, Debugging, Performance engineering, Runtimes & VMs
  Upgrading a data-processing service to Go 1.24 raised container memory by about 20% even though Go runtime metrics and heap profiles stayed flat.
- [We rewrote large parts of our API in Go using AI: we are now ready to handle one billion databases](https://swe.quest/articles/we-rewrote-large-parts-of-our-api-in-go-using-ai-we-are-now-ready-to-handle-one-dae54753b5d31582.md): Turso · 2025-05-29 · Medium · 7 min read · Go, Scaling, Memory management, SQLite, Caching
  Turso's Go API proxy, which maps database URLs to physical servers, ran out of memory as customers created millions of databases programmatically.
- [Hash tables in ClickHouse and C++ Zero-cost Abstractions](https://swe.quest/articles/hash-tables-in-clickhouse-and-c-zero-cost-abstractions-bd1cf29e2582e0a8.md): ClickHouse · 2023-05-16 · Hard · 19 min read · Data structures, C & C++, Performance engineering, Query engines, Analytics & OLAP
  ClickHouse implements GROUP BY and JOIN with a family of open-addressing hash tables generated from a common zero-cost C++ framework, specialized by key type and workload.
- [Go Turns 17](https://swe.quest/articles/go-turns-17-44df44064c6960cc.md): The Go Blog · 2026-11-10 · Easy · 12 min read · Go, Performance engineering, Developer tools, Cryptography, Memory management
  Go's 17th anniversary recap covers Go 1.26 and 1.27. On the language side, it adds generic methods, self-referential constraints, \`new\` with an initial value, and nested struct literal keys.
- [Session revocations at scale](https://swe.quest/articles/session-revocations-at-scale-0e845eb64b268c30.md): Canva Engineering · 2026-07-22 · Medium · 9 min read · Identity & auth, Caching, Scaling, System design, Storage systems
  Canva moved its gateway session-revocation cache from per-pod MySQL loads to sorted binary chunks in S3, eliminating the database stampede when hundreds of gateway pods started during deploys.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
