C++Now 2018: You Can Do Better than std::unordered_map: New Improvements to Hash Table Performance

Channel:CppNow · Length:1:30:53 · Published:2018-06-09 · Views:62997

Watch on YouTube

Summary

Malte Skarupke's C++Now 2018 talk on hash table performance, explaining why std::unordered_map is slow and memory hungry and presenting faster designs, including his bytell hash map.

Why HN recommends it

Recommended as a thorough, well-regarded explanation of hash table design tradeoffs and why the standard container is a poor choice.

Many videos on hash table are great. I found this one particularly good. — HN, 2024

C, C++, Rust, Go & systems languages · Software performance & optimization · Algorithms & data structures

Subtitles (excerpt)

welcome to my talk you can do better than Stan and you and recent improvements to hash tables I started you off here with the graph is just gonna show like the amount of improvement we're gonna get throughout the talk well we started off with a really slow tab and we're gonna end with a really fast tape and this is just a first indicator what we would do but we get there when we get there mostly there'll be lots of graphs in this talk so might as well start off with one my name is Monica aapke I'm an AI program at Avalanche Studios in New York I was also here last year in the same room gave a talk about radix sort where I've generalized it which makes sorting faster and n log n I still feel like more people should use that which is why I'm I'd like to mention it again but this talks about hash tables which is a obviously a hugely important data structure some say the most the most important one and it seems some new developments in recent years because I think what I wrote here is that a node on map being a little bit slow has kind of been a blessing in disguise because lots of people went out and thought that they could do better than standard map and often they could and then we saw really good developments and hash

On Hacker News

Many videos on hash table are great. I found this one particularly good. [ [VIDEO] ] C++Now 2018: You Can Do Better than std::unordered_map: New Improvements to Hash Table Performance — ww520, 2024-10
It has the right asymptotic guarantees for a hash map, but beyond that it doesn't have much going for it. The degree to which it emphasizes pointer/iterator stability and arbitrary load factors is not a good tradeoff in almost any practical case (unless you do not care about performance). See [VIDEO] for a more comprehensive discussion, or the sibling threads here. — MauranKilom, 2021-08
In my example the table stores the hash codes themselves instead of the keys (because the hash function is invertible) Oh, I see, right. If determining the home bucket is trivial, then the back-shifting method is great. The issue is just that it’s not as much of a general-purpose solution as it may initially seem. In the bad cases, it's really bad. With a different algorithm (Robin Hood or bidire… — JacksonAllan, 2023-11
> some kind of bucket-optimisation (multiple elements per allocation, instead of one element per allocation) should also meet all constraints the standard sets for this type Pretty sure that makes it impossible to implement merge without pointer/iterator invalidation, which is a constraint imposed by the standard ( [LINK] ). > it would be good if the person I originally responded to came out and … — MauranKilom, 2021-08

Related videos