[issue5169] Default hash not equal to id on AMD Sempron

Mark Dickinson report at bugs.python.org
Fri Feb 6 20:21:08 CET 2009


Mark Dickinson <dickinsm at gmail.com> added the comment:

Some preliminary timings indicate that it may well be worth replacing 'return (long)p' with 
'return (long)p >> 3' in _Py_HashPointer (in Objects/object.c): I'm getting a 10% speedup in 
dict-building and dict-lookup for dicts of plain objects.  I'll open a separate issue for this 
and post details of the timings.

In the meantime, I think this issue can be closed as invalid: there's no reason that id(a) and 
hash(a) have to be equal.  (chemacortes, if you disagree then please do comment; we'll still 
see the comments even though the issue is closed).

----------
resolution:  -> invalid
status: open -> closed

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


More information about the Python-bugs-list mailing list