efficient / libcuckoo

A high-performance, concurrent hash table
Other
1.62k stars 275 forks source link

Controversial CityHasher use encouraging #81

Closed rayrapetyan closed 7 years ago

rayrapetyan commented 7 years ago

In documentation (http://efficient.github.io/libcuckoo/class_city_hasher.html) you encourage to use CityHasher when possible. However, current implementation is not efficient for integer keys as it operates with any type of key as with byte array.

std::hash is 1.5-2 times faster for int keys and already contains CityHash implementation for a string keys.

I would suggest to drop CityHasher from libcuckoo (or at least do not encourage to use it) and stick with std::hash.

manugoyal commented 7 years ago

Yeah it should have been clearer in the docs that CityHasher is only meant for strings. Regardless, I think it's probably best to remove it from the repo, since most implementations of std::hash use CityHash, or some similarly strong hashing algorithm, for strings anyways. I just committed a change (d6036271a83fc43fab547ba08e1e422a5714f3e8) which removes it.

Thanks!

rayrapetyan commented 7 years ago

Thanks!