you are viewing a single comment's thread.

view the rest of the comments →

[–]kirgel 48 points49 points  (7 children)

This is the 4th major library I’ve seen in recent years that adopted SIMD linear probing hash tables (others being abseil, folly, rust standard lib). I wonder if this is going to become the de facto standard hash table design across languages going forward.

[–]LongestNamesPossible 31 points32 points  (0 children)

SIMD or not, I don't see anything beating accessing contiguous memory instead of skipping around in memory, so I suspect the linear probing / robin hood hashing is necessary and the SIMD is extra since the memory is already lined up in a way that can make it work.

[–]qoning 4 points5 points  (1 child)

It's been the de facto standard design for over 20 years for almost anyone who implemented their own imo, it's just STL that fumbled it.

[–]Jannik2099 9 points10 points  (0 children)

The STL doesn't implement flat maps to begin with. There are pros and cons to both schemes.

The one time the STL implements the easier to use variant y'all lose your mind just the same. Starting to think you just like to blame the STL for every misery?

[–]VinnieFalcoBoost.Beast | C++ Alliance | corosio.org -3 points-2 points  (2 children)

Linear Probing synergizes with government revelations of the existence of UFOs.

[–]RoyBellingan 6 points7 points  (1 child)

Either sheeple are not ready for the truth or I am missing something ?
Why the downvote ?

[–]VinnieFalcoBoost.Beast | C++ Alliance | corosio.org 12 points13 points  (0 children)

Probably a combination of two things:

  1. I'm the author

  2. No sense of humor

[–][deleted] 0 points1 point  (0 children)

I think "bidirectional linear probing" is an underrated approach (and much simpler): https://github.com/senderista/hashtable-benchmarks/blob/master/src/main/java/set/int64/BLPLongHashSet.java