Message368175
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:02 | vstinner | set | recipients:
+ vstinner |
2020-05-05 15:48:02 | vstinner | set | messageid: <1588693682.5.0.219755904926.issue40521@roundup.psfhosted.org> |
2020-05-05 15:48:02 | vstinner | link | issue40521 messages |
2020-05-05 15:48:02 | vstinner | create | |
|