[issue21556] try to use hashtable in pickle

Antoine Pitrou report at bugs.python.org
Fri May 23 10:57:26 CEST 2014

Antoine Pitrou added the comment:

> "_Py_hashtable_hash_ptr is quite crude in that it doesn't even try to compensate for pointer alignment, so there will automatically be many collisions. Only one hash bucket every 8 or 16 will be used, at best."
> I chose to use _Py_HashPointer() to drop (shift) lower bits. Do you
> mean that it's not enough? Python memory allocator uses an alignement
> on 8 bytes (2**3).

Ah, sorry, I just hadn't realized that.


Python tracker <report at bugs.python.org>

More information about the Python-bugs-list mailing list