How Swiss tables work in Go built-in map
victoriametrics.com
How Swiss tables work in Go built-in map
1–10 of 18 posts
Re: How Swiss tables work in Go built-in map
#2im 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
Re: How Swiss tables work in Go built-in map
#3swiss 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
Re: How Swiss tables work in Go built-in map
#4swiss 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
Go is much older than Swiss Tables. Since the hash table is a widely used container type and Go aspires to having a sort of "kitchen sink" stdlib I assume Go 1.0 had a hash table, and it can't be a Swiss Table because those weren't invented yet.
Re: How Swiss tables work in Go built-in map
#5swiss 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
Re: How Swiss tables work in Go built-in map
#6swiss 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
Re: How Swiss tables work in Go built-in map
#7Re: How Swiss tables work in Go built-in map
#8Re: How Swiss tables work in Go built-in map
#9In data-heavy Go services with maps in the millions of keys, my bottleneck was rarely lookup speed. It was memory footprint and GC cost, because the collector has to scan every pointer in the map on each mark, and a map with pointer-heavy keys or values is a lot to walk. More than once I ended up restructuring the data to be pointer-free, or moving it off-heap, just to take it off the GC's radar.
So the number I would want is not lookup throughput on a microbenchmark, but GC CPU and tail latency on a real workload at a high load factor. Has anyone measured the new map there? That is what would change my design decisions.