
How Go 1.24’s Swiss Tables saved us hundreds of gigabytes | Datadog
7/17/2025
This post details how Go 1.24's new Swiss Tables implementation for hash tables led to significant memory savings in Datadog's Go services. It explains the previous bucket-based map structure in Go 1.23, including bucket layout, slot management, overflow buckets, and map growth strategies. It then contrasts this with the improvements brought by Swiss Tables, which reduce memory overhead per entry and optimize bucket utilization. The post also covers how Datadog profiled and sized these memory savings, identifying specific maps like `shardRoutingCache` and detailing struct-level optimizations that further enhanced efficiency.