News for hackers. Stuff that matters.
Re:Building a faster hash table for high performance SQL joins by hawk_ on Wednesday December 20, 2023 @04:53PM (#38714141)
Can bidirectional linear probing be used for any key type? Or do the keys need to be of some integral type?
Re:Building a faster hash table for high performance SQL joins by senderista on Wednesday December 20, 2023 @05:20PM (#38714413)
The keys-as-hash codes trick only works for fixed-width integers; otherwise you have to explicitly store the hash codes. I assumed unique hash codes in my implementation, but I think you could easily adapt the algorithm to allow duplicate hash codes. Tolerating hash code collisions would avoid having to increase hash code size (for collisions in their case, you'd just need to probe multiple offsets in the key/value array).
Re:Building a faster hash table for high performance SQL joins by mlochbaum on Wednesday December 20, 2023 @05:07PM (#38714280)
Since the hashes are stored, you could order by hash. This would leave keys with the same hash unordered, so if you find an entry with equal hash but unequal key you have to keep probing, but that only matters on a full-hash collision.