[issue26163] FAIL: test_hash_effectiveness (test.test_set.TestFrozenSet)

Tim Peters report at bugs.python.org
Thu Oct 20 21:50:22 EDT 2016


Tim Peters added the comment:

I think Raymond will have to chime in.  I assume this is due to the `letter_range` portion of the test suffering hash randomization dealing it a bad hand - but the underlying string hash is "supposed to be" strong regardless of seed.  The

    self.assertGreater(4*u, t)
AssertionError: 124 not greater than 128

failure says 128 distinct sets hashed to only u = 124/4 = 31 distinct values across their hashes' last 7 bits, and that's worth complaining about.  It's way too many collisions.

It _may_ be a flaw in the set hash, or in the string hash, or just plain bad luck, but there's really no way to know which without digging into details.

----------
nosy: +tim.peters

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26163>
_______________________________________


More information about the Python-bugs-list mailing list