Skip to content

Add a version number to code objects #98522

Closed
@markshannon

Description

@markshannon

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    performancePerformance or resource usage

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions