[issue2607] why is (default)dict so slow on tuples???
Alexander Belopolsky
report at bugs.python.org
Thu Apr 10 18:37:51 CEST 2008
Alexander Belopolsky <belopolsky at users.sourceforge.net> added the comment:
My guess is that this is due to the fact that strings cache their hash
values while tuples don't. IIRC, caching tuple's hash values has been
proposed and rejected some time ago. Furthermore, dict lookups are
heavily optimized for the case when all keys are strings.
----------
nosy: +belopolsky
__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue2607>
__________________________________
More information about the Python-bugs-list
mailing list