News for hackers. Stuff that matters.
Re:C++ macros to write a hashtable implementation by CyberDildonics on Saturday March 10, 2018 @05:24PM (#16560481)
The standard dictates performance characteristics that imply the use of buckets, so there is more pointer hopping. A hash map that uses flat memory will end up being better. I would guess robin hood hashing + flat memory would be one of the most competitive techniques.
Re:C++ macros to write a hashtable implementation by maxlybbert on Saturday March 10, 2018 @08:55PM (#16561281)
On top of the performance guarantees, the API explicitly mentions buckets (e.g., http://en.cppreference.com/w/cpp/container/unordered_map/max... , http://en.cppreference.com/w/cpp/container/unordered_map/buc... ).
Re:C++ macros to write a hashtable implementation by stochastic_monk on Sunday March 11, 2018 @02:24PM (#16564115)
Well, even khash uses buckets. It’s just that you skip over your “correct” bucket for insertion if it’s full when using open addressing.