Hash Function CityHash C++

Nov 18, 2012 at 11:53am
Can Anyone provide me a link to where I can find the C++ code for CityHash fucntion.
Nov 18, 2012 at 11:55am
Do you know how to use google?
Nov 18, 2012 at 12:17pm
If I found it on Google I would not have posted it here.
Nov 18, 2012 at 12:25pm
Well, that's interesting. The very first link when you google takes you to a code repository with a C++ implementation.
Nov 18, 2012 at 12:29pm
Mind Sharing it?
Nov 18, 2012 at 1:08pm
What do you mean by 'CityHash'?
Nov 18, 2012 at 1:17pm
CIthHash is a hash function like Pearson hashing.
it maps a string to a number.
Nov 18, 2012 at 1:23pm
Ah... I want to know some hash algorithms. Then I'll put all (all in one!) into a function. But, why do you know this hash? (I'm curious, hehe...)
Last edited on Nov 18, 2012 at 1:23pm
Nov 18, 2012 at 1:25pm
No particular reason, any hash function will do as long as it fast and does not produce too much collisions
Nov 18, 2012 at 1:54pm
> CIthHash is a hash function like Pearson hashing.
> it maps a string to a number.
> any hash function will do as long as it fast and does not produce too much collisions

Why not just use std::hash<std::string>?
There is an example here: http://en.cppreference.com/w/cpp/utility/hash
Topic archived. No new replies allowed.