This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients vstinner
Date 2020-05-05.15:48:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
tuple, dict and frame use free lists to optimize the creation of objects.

Unicode uses "interned" strings to reduce the Python memory footprint and speedup dictionary lookups.

Unicode also uses singletons for single letter Latin1 characters ([U+0000; U+00FF] range).

All these optimizations are incompatible with isolated subinterpreters, since caches are currently shared by all inteprepreters. These caches should be made per-intepreter. See bpo-40512 "Meta issue: per-interpreter GIL" for the rationale.

I already made small integer singletons per interpreter in bpo-38858:

* commit 5dcc06f6e0d7b5d6589085692b86c63e35e2325e
* commit 630c8df5cf126594f8c1c4579c1888ca80a29d59.
Date User Action Args
2020-05-05 15:48:02vstinnersetrecipients: + vstinner
2020-05-05 15:48:02vstinnersetmessageid: <>
2020-05-05 15:48:02vstinnerlinkissue40521 messages
2020-05-05 15:48:02vstinnercreate