[issue34751] Hash collisions for tuples

Tim Peters report at bugs.python.org
Sun Sep 23 20:41:19 EDT 2018


Tim Peters <tim at python.org> added the comment:

[Raymond, on boosting the multiplier on 64-bit boxes]
> Yes, that would be perfectly reasonable (though to some
> extent the objects in the tuple also share some of the
> responsibility for getting all bits into play).

It's of value independent of that.  Tuples of ints used as keys and set elements are very important, and I doubt we'll ever give up on that `hash(i) == i` for the typically "not huge" ints used in such contexts.  Jeroen gave a reasonable example of how boosting the multiplier can help in a case of that above:

https://bugs.python.org/msg326032

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34751>
_______________________________________


More information about the Python-bugs-list mailing list