On Wed, 9 Mar 2022 at 23:28, Martin Di Paola <martinp.dipa...@gmail.com> wrote:
> Think in the immutable strings (str). What would happen with a program
> that does heavy parsing? I imagine that it will generate thousands of
> little strings. If those are immortal, the program will fill its memory
> very quickly as the GC will not reclaim their memory.

Well, as far as I know immortality was also suggested for interned
strings. If I understood well, the problem with "normal" strings is
that they are not really immutable in CPython. They have cache etc.
Also frozendict caches hash, but that cache can be easily removed.
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to