[issue19187] Use a set for interned strings

Raymond Hettinger report at bugs.python.org
Tue Oct 8 05:11:39 CEST 2013


Raymond Hettinger added the comment:

If sets need to be hacked-up to accommodate this, I would like to draft the patch for it that I think will be cleaner.

FWIW, I'm dubious that there will be any benefit from this at all.  The savings of one-pointer is the dictionary is likely to be insignificant compared to the size of the string object themselves.

Also, I think sets conceptually are not the right choice of data structure because they are primarily about membership testing and not about looking up values.   Incorporating this kind of hack will make my other set optimization efforts more difficult.

----------

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


More information about the Python-bugs-list mailing list