[issue34751] Hash collisions for tuples

Tim Peters report at bugs.python.org
Tue Oct 2 14:32:29 EDT 2018


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

A meta-comment:  a great deal of work has been done on non-crypto hashes in recent years.  I'm not interested in rolling our own if one of the "winners" from that process can be adapted.  For that reason, I've only been looking at those that scored 10 (best possible) on Appleby's SMHasher[1] test suite, which is used by everyone who does recognized work in this field.  SeaHash appears to be the fastest of those, with short & simple code.

I'm concerned that I've been putting way too much weight on "the new" tuple test.  That uses a grand total of 10 tiny integers in -5 .. 5 (omits -1).  _All_ base-component variation is in the last 3 bits, while the top 61 bits are all 0 or all 1.  Great for testing nested tuples with tiny mixed-sign integers, but that's a minuscule region of the problem space.

[1] https://github.com/aappleby/smhasher

----------

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


More information about the Python-bugs-list mailing list