replaced simple_hash with the FNV-1a 32bit algorithm again
Costa Tsaousis (ktsaou) committed
Apr 3, 2015 at 01:08 UTC
c8514d9d9ea119457c910d4e3dec7c3f2bca501e
1 file changed
+3
-2
src/common.c
+3
-2
@@ -30,7 +30,7 @@ uint32_t simple_hash(const char *name)
30
}
31
*/
32
33
-/*
33
+
34
// http://isthe.com/chongo/tech/comp/fnv/#FNV-1a
35
uint32_t simple_hash(const char *name) {
36
unsigned char *s = (unsigned char *)name;
@@ -49,8 +49,8 @@ uint32_t simple_hash(const char *name) {
49
// fprintf(stderr, "HASH: %u = %s\n", hval, name);
50
return hval;
51
}
52
-*/
52
53
+/*
54
// http://eternallyconfuzzled.com/tuts/algorithms/jsw_tut_hashing.aspx
55
// one at a time hash
56
uint32_t simple_hash(const char *name) {
@@ -71,6 +71,7 @@ uint32_t simple_hash(const char *name) {
71
72
return h;
73
}
74
+*/
75
76
void strreverse(char* begin, char* end)
77
{