split mutable and immutable parts of code objects #102802
Labels
interpreter-core
(Objects, Python, Grammar, and Parser dirs)
performance
Performance or resource usage
Code objects are mostly immutable, but have some mutable parts:
co_code_adaptive
,co_extra
,_co_cached
, andco_filename
(I think this is all on first glance, may have missed something.)It would be useful to split the immutable and mutable parts of the code object, so as to be able to maximize sharing; see discussion in faster-cpython/ideas#466
The mutable part should have a pointer to the immutable part, rather than the other way around; this leaves open the possibility of sharing the immutable part between sub-interpreters.
The text was updated successfully, but these errors were encountered: