[issue26314] interned strings are stored in a dict, a set would use less memory

Serhiy Storchaka report at bugs.python.org
Sat Mar 12 00:26:28 EST 2016


Serhiy Storchaka added the comment:

Dicts are hard optimized for string keys due to using them for globals and attributes lookup. Sets are optimized too, but rather for accident. We can be sure that dicts will be always optimized, but set optimization can be eliminated for the sake of simplification or if it will be proven that special casing strings has enough large negative effect on non-string items.

----------
nosy: +serhiy.storchaka

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


More information about the Python-bugs-list mailing list