Skip to content
HomeVideos
AllLongsCategoriesPlaylists
BooksBlogsPodcasts
HistoryListsWatch laterLiked videosFollowing

The videos, books, blogs and podcasts Hacker News keeps recommending, all in one place.

VideosBooksBlogsPodcastsAboutPrivacySettings

Data from Hacker News, HackerTube, HackerBooks, HackerBlogs and Open Library. Credits · Not affiliated with Y Combinator.

HomeVideosBooksBlogsPodcasts
Ctrl K

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

    CppNow

    2 HN recommenders · recommended in 3 months, 2021–2024

    YouTube

    1:30:53 · 63K views · Jun 9, 2018

    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.

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

    Software Engineering & LanguagesSoftware performance & optimizationAlgorithms & data structuresC, C++, Rust, Go & systems languages
    1. 1:13:41
      CppCon 2014: Chandler Carruth "Efficiency with Algorithms, Performance with Data Structures"CppCon235K views • 12 years ago
    2. 59:34
      CppCon 2017: Matt Kulukundis “Designing a Fast, Efficient, Cache-friendly Hash Table, Step by Step”CppCon137K views • 9 years ago
    3. 54:01
      Abseil's Open Source Hashtables: 2 Years In - Matt Kulukundis - CppCon 2019CppCon22K views • 7 years ago
    4. 58:36
      Advanced Topics in Programming Languages: A Lock-Free Hash TableGoogleTalksArchive29K views • 14 years ago
    5. 1:54:00
      Can C++ be 10x Simpler & Safer? - Herb Sutter - CppCon 2022CppCon277K views • 3 years ago
    6. 1:29:55
      Sorting Algorithms: Speed Is Found In The Minds of People - Andrei Alexandrescu - CppCon 2019CppCon184K views • 7 years ago
    7. 31:19
      CppCon 2016: Nicholas Ormrod “The strange details of std::string at Facebook"CppCon122K views • 10 years ago
    8. 1:27:46
      CppCon 2014: Mike Acton "Data-Oriented Design and C++"CppCon863K views • 12 years ago
    9. 1:04:00
      CppCon 2015: Sean Parent "Better Code: Data Structures"CppCon106K views • 11 years ago
    10. 1:17:12
      C++ Seasoningaghuttun58K views • 13 years ago
    11. 55:49
      CppCon 2016: Chandler Carruth “High Performance Code 201: Hybrid Data Structures"CppCon119K views • 10 years ago
    12. 1:00:17
      Stephan T. Lavavej “Floating-Point <charconv>: Making Your Code 10x Faster With C++17's Final Boss”CppCon41K views • 7 years ago
    13. 52:54
      Rust at speed — building a fast concurrent databaseJon Gjengset225K views • 7 years ago
    14. 1:12:27
      CppCon 2015: Andrei Alexandrescu “std::allocator...”CppCon196K views • 11 years ago
    15. 34:55
      "Outperforming Imperative with Pure Functional Languages" by Richard FeldmanStrange Loop Conference98K views • 5 years ago
    16. 1:21:13
      C++ and Beyond 2012: Herb Sutter - atomic Weapons 1 of 2alexsmail71K views • 8 years ago
    17. 30:37
      High-performance Tree Wrangling, the APL Way // Aaron Hsu // Dyalog '18Dyalog User Meetings5.8K views • 7 years ago
    18. 40:18
      "Compacting the Uncompactable" by Bobby PowersStrange Loop Conference29K views • 7 years ago
    19. 1:33:02
      2013 Keynote: Chandler Carruth: Optimizing the Emergent Structures of C++CppNow34K views • 13 years ago
    20. 1:39:25
      CppCon 2016: Herb Sutter “Leak-Freedom in C++... By Default.”CppCon149K views • 10 years ago

    4 comments from Hacker News

    1. @MauranKilomAug 2021· in “JSON for Modern C++ version 3.10.0”

      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 this video for a more comprehensive discussion, or the sibling threads here.

      RecommendsView on HN
    2. @ww520Oct 2024· in “1BRC Coding Challenge: Nerd Sniping the Java Community”

      Many videos on hash table are great. I found this one particularly good. [ this video ] C++Now 2018: You Can Do Better than std::unordered_map: New Improvements to Hash Table Performance

      RecommendsView on HN
    3. @JacksonAllanNov 2023· in “Factor is faster than Zig”

      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 bidirectional linear probing), the load factor can be kept well over 90% with good performance, as the benchmarks in the same repo demonstrate. I’ve seen the 90% claim made several times in literature on Robin Hood hash tables. In my experience, the claim is a bit exaggerated, although I suppose it depends on what our idea of “good performance” is. See these benchmarks, which again go up to a maximum load factor of 0.95 (although boost and Absl forcibly grow/rehash at 0.85-0.9): [LINK] Tsl, Martinus, and CC are all Robin Hood tables ( [LINK] , [LINK] , and [LINK] , respectively). Absl (from Google) and Boost are well-known C++ SIMD-based hash tables. Khash ( [LINK] ) is, I think, an ordinary open-addressing table using quadratic probing. Fastmap is a new, yet-to-be-published design that is fundamentally similar to bytell ( this video ) but also incorporates some aspects of the aforementioned SIMD maps (in particular, it stores a 4-bit fragment of the hash code to avoid most false key comparisons). As you can see, all the Robin Hood maps spike upwards dramatically as the load factor gets high,

      CitesView on HN
    4. @MauranKilomAug 2021· in “JSON for Modern C++ version 3.10.0”

      > 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 defended his POV See [LINK] if you want numbers, or for example this talk by the same author this video .

      CitesView on HN