Content-Length: 210041 | pFad | https://github.com/python/cpython/issues/98522

02 Add a version number to code objects · Issue #98522 · python/cpython · GitHub
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a version number to code objects #98522

Closed
markshannon opened this issue Oct 21, 2022 · 0 comments
Closed

Add a version number to code objects #98522

markshannon opened this issue Oct 21, 2022 · 0 comments
Labels
performance Performance or resource usage

Comments

@markshannon
Copy link
Member

markshannon commented Oct 21, 2022

We want to add a version number to code objects, so that all functions that are created from the same code object have the same version number (at least until they are mutated).

Code objects are immutable, so they do not need a version number themselves, it is just to help function objects.
By ensuring that all function objects created from the same code object have the same version number, we can effectively specialize comprehensions and inner functions.

See faster-cpython/ideas#446 for more details.

@markshannon markshannon added the performance Performance or resource usage label Oct 21, 2022
markshannon added a commit that referenced this issue Dec 9, 2022
* Add version number to code object for better versioning of functions.

* Improves specialization for closures and list comprehensions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Performance or resource usage
Projects
None yet
Development

No branches or pull requests

1 participant








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/python/cpython/issues/98522

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy