diff options
author | Thomas White <taw@physics.org> | 2015-08-31 16:16:00 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2015-08-31 16:17:01 +0200 |
commit | 47e429bb918cc1aa9c918410b57d2b1f4ff9231b (patch) | |
tree | bba020a72099571ee266cb67baa4d8839ef5bfea /src/partialator.c | |
parent | ea0c9be77763ca695d646d4f4239c69eb68974fc (diff) |
partialator: Improve hash function (again)
Diffstat (limited to 'src/partialator.c')
-rw-r--r-- | src/partialator.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/partialator.c b/src/partialator.c index a3fc712e..59d78f11 100644 --- a/src/partialator.c +++ b/src/partialator.c @@ -84,7 +84,7 @@ static int csplit_hash(const char *id) int h = 0; for ( i=0; i<len; i++ ) { - h = (h*i +id[i]) % CSPLIT_HASH_MAX; + h = (h*31 + id[i]) % CSPLIT_HASH_MAX; } assert(h < CSPLIT_HASH_MAX); |