Index: Objects/object.c =================================================================== --- Objects/object.c (revision 69436) +++ Objects/object.c (working copy) @@ -1073,7 +1073,9 @@ _Py_HashPointer(void *p) { #if SIZEOF_LONG >= SIZEOF_VOID_P - return (long)p; + /* in most cases the bottom three bits of p will be zero; shift p to + reduce the number of hash collisions */ + return (long)p >> 3; #else /* convert to a Python long and hash that */ PyObject* longobj;