xxh128 len[4-8] : minor change

it's not useful to swap input segments
the differentiation from seed is already taken care of by the seed itself
and keeping number in the low bits slightly improves dispersion.
Also may improve speed for specific case len=8 (constant)
This commit is contained in:
Yann Collet 2020-02-26 19:32:01 -08:00
parent 48933f0037
commit b54708f05b

2
xxh3.h
View File

@ -1434,7 +1434,7 @@ XXH3_len_4to8_128b(const xxh_u8* input, size_t len, const xxh_u8* secret, XXH64_
seed ^= (xxh_u64)XXH_swap32((xxh_u32)seed) << 32;
{ xxh_u32 const input_lo = XXH_readLE32(input);
xxh_u32 const input_hi = XXH_readLE32(input + len - 4);
xxh_u64 const input_64 = input_hi + ((xxh_u64)input_lo << 32);
xxh_u64 const input_64 = input_lo + ((xxh_u64)input_hi << 32);
xxh_u64 const keyed = input_64 ^ (XXH_readLE64(secret) + seed);
XXH128_hash_t m128 = XXH_mult64to128(keyed, PRIME64_1 + (len << 2));