[issue30671] dict: improve lookup function

Tim Peters report at bugs.python.org
Sun Jun 18 15:02:04 EDT 2017


Tim Peters added the comment:

I don't see a reason to keep this open, but I haven't been able to follow the OP's line of argument.  My best _guess_ is that they're chasing illusions based on not understanding (or grossly undervaluing) that the primary point of the perturb logic is to incrementally fold in hash code bits that _didn't_ have any effect at all on the initial table index.  It's true that for a hash table with 2**p slots, the current scheme could be improved in several ways _if_ hash codes only had p bits.  To judge from the Python code they posted, they either (erroneously) assumed that was the case, or offhandedly dismissed the potential value of folding in hash code bits beyond the p'th most significant.

But, since I've been unable to follow the argument, I could be wrong about all that.  So if they don't clarify within a few days, I'll close this.

----------

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


More information about the Python-bugs-list mailing list