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

STINNER Victor report at bugs.python.org
Sun Mar 13 06:03:21 EDT 2016


STINNER Victor added the comment:

Serhiy Storchaka added the comment:
>
> Since interned strings table can only grow and contains exact strings,
> other data structure may be more appropriate (for example
> Modules/hashtable.c).
>

FYI this module is not well optimized. I took code and then adapted it for
my needs in tracemalloc. If you want to use it outside, you should check
again that parameters like used buckets/total buckets ratio are well chosen.

----------

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


More information about the Python-bugs-list mailing list