Re: [PATCH 3/4] xdiff: use stronger hash function internally

2017-10-24 Thread Jonathan Nieder
Stefan Beller wrote: > --- a/xdiff/xutils.c > +++ b/xdiff/xutils.c > @@ -24,7 +24,8 @@ > #include > #include "xinclude.h" > > - > +#include "cache.h" > +#include "hashmap.h" #includes like "git-compat-util.h" and "cache.h" can only be used as the *first* #include. Otherwise the feature test

Re: [PATCH 3/4] xdiff: use stronger hash function internally

2017-10-24 Thread Stefan Beller
On Tue, Oct 24, 2017 at 1:23 PM, René Scharfe wrote: > Am 24.10.2017 um 20:59 schrieb Stefan Beller: >> Instead of using the hash seeded with 5381, and updated via >> `(hash << 5) ^ new_byte`, use the FNV-1 primitives as offered by >> hashmap.h, which is seeded with 0x811c9dc5 and computed as >> `

Re: [PATCH 3/4] xdiff: use stronger hash function internally

2017-10-24 Thread René Scharfe
Am 24.10.2017 um 20:59 schrieb Stefan Beller: > Instead of using the hash seeded with 5381, and updated via > `(hash << 5) ^ new_byte`, use the FNV-1 primitives as offered by > hashmap.h, which is seeded with 0x811c9dc5 and computed as > `(hash * 0x01000193) ^ new_byte`. The hash function you're r

[PATCH 3/4] xdiff: use stronger hash function internally

2017-10-24 Thread Stefan Beller
Instead of using the hash seeded with 5381, and updated via `(hash << 5) ^ new_byte`, use the FNV-1 primitives as offered by hashmap.h, which is seeded with 0x811c9dc5 and computed as `(hash * 0x01000193) ^ new_byte`. Signed-off-by: Stefan Beller --- xdiff/xutils.c | 19 --- 1 fi