Skip to content

Eliminate redundant refcounting in the JIT for LOAD_ATTR_MODULE #143995

@aisk

Description

@aisk

Feature or enhancement

Proposal:

As a follow-up to #134584, we can eliminate redundant ref-counting for LOAD_ATTR_MODULE.

Note that if a module is imported globally (as is most commonly done, at the top of a file), attribute access via LOAD_ATTR_MODULE may be optimized into a constant load. Therefore, this optimization only applies when a module is imported locally, for example, within a function.

Has this already been discussed elsewhere?

This is a minor feature, which does not need previous discussion elsewhere

Links to previous discussion of this feature:

No response

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    interpreter-core(Objects, Python, Grammar, and Parser dirs)pendingThe issue will be closed if no feedback is providedperformancePerformance or resource usagetopic-JITtype-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions