Beispiel #1
0
        //default String.GetHashCode() can't well spread strings like "1", "2", "3"
        public static int BetterHash(String key)
        {
            uint hash = MurmurHash2.Hash(Encoding.UTF8.GetBytes(key));

            return((int)hash);
        }
Beispiel #2
0
 public static int BetterHash(string key)
 {
     return((int)MurmurHash2.Hash(Encoding.UTF8.GetBytes(key)));
 }