7 comments

  • mgaunard 2 hours ago

    How does it compare to boost unordered flat map?

    Looks like the benchmarks were last updated in 2019.

    • compiler-guy an hour ago

      https://tessil.github.io/2016/08/29/benchmark-hopscotch-map....

      Has some older benchmarks, including those two.

      • jeffbee an hour ago

        A more recent benchmark is https://martin.ankerl.com/2022/08/27/hashmap-bench-01/

        However, it lacks the newer Boost stuff which is very fast.

        The Hopscotch map was interesting at the time but due to unfortunate timing was immediately outshone by absl::unordered_flat_map A.K.A. "Swiss tables", and there's been even more water under the bridge since then.

        • RossBencina 10 minutes ago

          Abseil Swiss Tables carefully avoids intermediate allocations/copy constructor calls.[1] I'd be wary about inferring underlying algorithm performance from benchmarks that don't explicitly control for these optimisations. (Or maybe everyone is using them and I'm out of touch.)

          [1] https://abseil.io/about/design/swisstables

        • quadrature 43 minutes ago

          Is there something better than Swiss tables ?.

          • szmarczak 8 minutes ago

            No. Fundamentally it's not possible to be faster.

            • infamouscow a few seconds ago

              This is not true. It is fast as a general purpose hash table, but claiming it's the fastest across all datasets and workloads is silly.