mirror of
https://github.com/FEX-Emu/xxHash.git
synced 2024-11-24 06:59:40 +00:00
minor simplification
This commit is contained in:
parent
de90226410
commit
6c3f96a9cc
8
xxh3.h
8
xxh3.h
@ -574,17 +574,15 @@ XXH3_len_4to8_64b(const xxh_u8* input, size_t len, const xxh_u8* secret, XXH64_h
|
||||
XXH_ASSERT(input != NULL);
|
||||
XXH_ASSERT(secret != NULL);
|
||||
XXH_ASSERT(4 <= len && len < 8);
|
||||
//seed = XXH_rotl64(seed, 13);
|
||||
{ xxh_u32 const input1 = XXH_readLE32(input);
|
||||
xxh_u32 const input2 = XXH_readLE32(input + len - 4);
|
||||
xxh_u32 const key1 = input1 ^ ((xxh_u32)(seed >> 32) + XXH_readLE32(secret));
|
||||
xxh_u32 const key2 = input2 ^ (XXH_readLE32(secret+4) - (xxh_u32)seed);
|
||||
xxh_u64 const mix = XXH_mult32to64(key1, key2)
|
||||
+ (XXH_swap64(input1) >> 12)
|
||||
+ (XXH_swap64(input2) >> 13)
|
||||
+ (XXH_swap64(input1) >> 0)
|
||||
+ (XXH_swap64(input2) >> 1)
|
||||
+ len;
|
||||
//return XXH3_avalanche(mix);
|
||||
return XXH3_avalanche(mix ^ (mix >> 47));
|
||||
return XXH3_avalanche(mix ^ (mix >> 59));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user