Skip to content

Commit

Permalink
Final hash constants tunings.
Browse files Browse the repository at this point in the history
  • Loading branch information
tylov committed Apr 24, 2023
1 parent 38aab1d commit 3dcd44c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/stc/ccommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,9 @@ STC_INLINE uint64_t cfasthash(const void* key, intptr_t len) {
len &= 7;
while (n--) {
memcpy(&u8, x, 8), x += 8;
h = (h ^ u8)*0x9e3779b97f4a7c15;
h = (h ^ u8)*0xc6a4a7935bd1e99d;
}
while (len--) h = (h ^ *x++)*0xbf58476d1ce4e5b9;
while (len--) h = (h ^ *x++)*0x100000001b3;
return h;
}

Expand Down

0 comments on commit 3dcd44c

Please sign in to comment.