New GitHub issue #102802 from carljm:<br>

<hr>

<pre>
Code objects are mostly immutable, but have some mutable parts: `co_code_adaptive`, `co_extra`, `_co_cached`, and `co_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 https://github.com/faster-cpython/ideas/issues/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.
</pre>

<hr>

<a href="https://github.com/python/cpython/issues/102802">View on GitHub</a>
<p>Labels: performance</p>
<p>Assignee: </p>