Jeroen Demeyer <[email protected]> added the comment:
> 100% pure SeaHash does x ^= t at the start first, instead of `t ^ (t << 1)`
> on the RHS.
Indeed. Some initial testing shows that this kind of "input mangling" (applying
such a permutation on the inputs) actually plays a much more important role to
avoid collisions than the SeaHash operation x ^= ((x >> 16) >> (x >> 29)).
So my suggestion remains
for y in INPUT:
t = hash(y)
t ^= t * SOME_LARGE_EVEN_NUMBER
h ^= t
h *= MULTIPLIER
Adding in the additional SeaHash operations
x ^= ((x >> 16) >> (x >> 29))
x *= MULTIPLIER
does not increase the probability of the tests passing.
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue34751>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com