[issue5186] Reduce hash collisions for objects with no __hash__ method

Adam Olsen report at bugs.python.org
Thu Feb 12 04:19:59 CET 2009


Adam Olsen <rhamph at gmail.com> added the comment:

Testing with a large set of ids is a good demonstration, but not proof.
 Forming a set of *all* possible values within a certain range is proof.

However, XOR does work (OR definitely does not) — it's a 1-to-1
transformation (reversible as you say.)

Additionally, it still gives the unnaturally low collision rate when
using sequential addresses, so there's no objection there.

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


More information about the Python-bugs-list mailing list