Jeroen Demeyer <j.deme...@ugent.be> added the comment:

> In the absence of a real analysis, the intuition is simply that "t ^= t << 7" 
> will clear masses of leading sign bits when hashing "small" negative integers.

That's a clever solution. If you want to go that route, I would rather suggest 
t ^= t << 1 which is essentially the same fix but which has probably less 
collisions on the low-order bits.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue34751>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to