[Python-Dev] Re: Alternative implementation of string interning

M.-A. Lemburg mal@lemburg.com
Thu, 04 Jul 2002 12:54:27 +0200


Tim Peters wrote:
> So far, I don't know of any real loss that would occur as a result of
> reclaiming unreferenced interned strings.

Has anybody ever checked how many such strings live in the
intern dict with ref count 1 in real life apps ?

E.g. say you have Zope running on a standard web-site
for 2 days -- how many such strings do you find in the
interned dict ?

Speaking for myself, I would have a problem with removing
automatic interning of constant strings in Python source
code since I rely on that "feature" for fast switching
on values (if..elif..elif.......else). Since code objects
usually don't go away while the interpreter is running,
these would not be affected by the proposed strategy.

-- 
Marc-Andre Lemburg
CEO eGenix.com Software GmbH
_______________________________________________________________________
eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,...
Python Consulting:                               http://www.egenix.com/
Python Software:                    http://www.egenix.com/files/python/