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

    CppCon 2017: Matt Kulukundis “Designing a Fast, Efficient, Cache-friendly Hash Table, Step by Step”

    CppCon

    9 HN recommenders · recommended in 18 months, 2018–2026

    YouTube

    59:34 · 137K views · Oct 26, 2017

    Matt Kulukundis explains how Google designed SwissTable, a fast, cache-friendly hash table, step by step from std::unordered_map. The talk covers open addressing, SIMD probing and the tradeoffs of changing a fundamental data structure.

    HN repeatedly cites it as the definitive explanation of SwissTable, the design behind Abseil, Rust's hash map and Go's maps.

    Mathematics & Theoretical CSAlgorithms & data structuresSoftware performance & optimizationC, C++, Rust, Go & systems languages
    1. 57:39
      CppCon 2016: Chandler Carruth “Garbage In, Garbage Out: Arguing about Undefined Behavior..."CppCon94K views • 10 years ago
    2. 1:29:06
      CppCon 2015: Herb Sutter "Writing Good C++14... By Default"CppCon193K views • 11 years ago
    3. 54:01
      Abseil's Open Source Hashtables: 2 Years In - Matt Kulukundis - CppCon 2019CppCon22K views • 7 years ago
    4. 1:30:53
      C++Now 2018: You Can Do Better than std::unordered_map: New Improvements to Hash Table PerformanceCppNow63K views • 8 years ago
    5. 1:13:41
      CppCon 2014: Chandler Carruth "Efficiency with Algorithms, Performance with Data Structures"CppCon235K views • 12 years ago
    6. 58:36
      Advanced Topics in Programming Languages: A Lock-Free Hash TableGoogleTalksArchive29K views • 14 years ago
    7. 1:27:46
      CppCon 2014: Mike Acton "Data-Oriented Design and C++"CppCon863K views • 12 years ago
    8. 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
    9. 55:49
      CppCon 2016: Chandler Carruth “High Performance Code 201: Hybrid Data Structures"CppCon119K views • 10 years ago
    10. 1:29:55
      Sorting Algorithms: Speed Is Found In The Minds of People - Andrei Alexandrescu - CppCon 2019CppCon184K views • 7 years ago
    11. 31:19
      CppCon 2016: Nicholas Ormrod “The strange details of std::string at Facebook"CppCon122K views • 10 years ago
    12. 1:00:07
      CppCon 2017: Carl Cook “When a Microsecond Is an Eternity: High Performance Trading Systems in C++”CppCon358K views • 9 years ago
    13. 1:14:22
      CppCon 2017: Fedor Pikus “C++ atomics, from basic to advanced. What do they really do?”CppCon289K views • 9 years ago
    14. 1:19:52
      CppCon 2016: Jason Turner “Rich Code for Tiny Computers: A Simple Commodore 64 Game in C++17”CppCon264K views • 10 years ago
    15. 1:15:46
      CppCon 2017: Matt Godbolt “What Has My Compiler Done for Me Lately? Unbolting the Compiler's Lid”CppCon178K views • 9 years ago
    16. 1:04:00
      CppCon 2015: Sean Parent "Better Code: Data Structures"CppCon106K views • 11 years ago
    17. 46:40
      Andrew Kelley: A Practical Guide to Applying Data Oriented Design (DoD)ChimiChanga416K views • 2 years ago
    18. 1:06:00
      CppCon 2017: Juan Pedro Bolivar Puente “Postmodern immutable data structures”CppCon31K views • 9 years ago
    19. 59:53
      CppCon 2019: Chandler Carruth “There Are No Zero-cost Abstractions”CppCon147K views • 7 years ago
    20. 1:39:25
      CppCon 2016: Herb Sutter “Leak-Freedom in C++... By Default.”CppCon149K views • 10 years ago

    19 comments from Hacker News

    1. @sujayakarMar 2021· in “MIPS Becomes RISC-V”

      Very cool! Independent of the cool use of `aesenc` and `aesdec`, the features for skipping ahead in the random stream and forking a separate stream are awesome. > My current home project is bump-allocator + semi-space garbage collection in SIMD for GPUs. As far as I can tell, both bump-allocation and semi-space garbage collection are easily SIMDified in an obvious manner. And since cudamalloc is fully synchronous, I wanted a more scalable, parallel solution to the GPU memory allocation problem. This is a great idea. I wonder if we could speed up LuaJIT even more by SIMD accelerating the GC's mark and/or sweep phases... If you're interested in more work in this area, a former coworker wrote a neat SPMD implementation of librsync [1]. And, if you haven't seen it, the talk on SwissTable [2] (Google's SIMD accelerated hash table) is excellent. [1] [LINK] [2] this video

      Strongly recommendsView on HN
    2. @nwallinOct 2019· in “Hash tables”

      I think you're underestimating the number of memory redirections that are necessary for chaining. It's more than one. That's the killer. It's important to be wary of assuming your data will be in cache. It usually isn't. The problem isn't making lots of high density searches in a hash map, the problem is making a search every now and then. A hash map that makes three DRAM accesses will always be worse that one that makes one, regardless of how much work it needs to do, and this is for two reasons. First is there obvious: RAM is slow as balls, we get it. Second is more insidious. You just evicted two cache lines. It's not just the lookup itself that's slower, you also made the consumer of your data structure slower. Here's a look at what open addressing looks like these days: this video (warning, it's an hour. Takes a while to build up, too. Still worth it.)

      Strongly recommendsView on HN
    3. @lalitmagantiJul 2026· in “Golang Maps: how Swiss Tables replaced the old bucket design”

      Have to plug the original Swiss Table talk by Matt Kulukundis: this video Excellent talk which explains the concepts really clearly and concisely.

      Strongly recommendsView on HN
    4. @KerrickStaleyNov 2022· in “Inside boost::unordered_flat_map”

      Related: this talk this video about the making of absl::flat_hash_map (a "competitor" to boost::unordered_flat_map) is one of my favorites.

      Strongly recommendsView on HN
    5. @kllrnohjAug 2019· in “Bulk Data Structures C++”

      This is where we get into O(1) != fast territory. Algorithmic complexity has a weak relationship to CPU performance, not a strong one. If you want to find something in a set storing it as an array and doing a linear scan will beat a std::unordered_set up to a shockingly large number of items due to how CPU's work. In particular it's the pointer chasing aspect of std::unordered_set that becomes a problem (an issue shared with _most_ hash set implementations). Remember an unordered_set is not an array of items, it's an array of buckets of items (this is how hash collision is handled). Worse still, those buckets are usually linked lists. It typically can't be speculated effectively and it can't be prefetched effectively, so you become memory latency bound during an un-cached lookup. And memory latency is just shy of absolutely terrible. If you're expecting L1/L2/L3 cache hits on lookups then you're not dealing with vary large sizes probably and you're going to get much better cache density with the flat array than the array-of-buckets. There are alternative hashsets that are flat and avoid this, but they are less common and as far as I know no standard implementation on any language uses such a hash set. There's a good talk about such a dense, flat hash set here: this video

      RecommendsView on HN