Skip to content

Remove redundant small int check in long_dealloc #127119

Description

@eendebakpt

Feature or enhancement

Proposal:

The python small ints are immortal with a fixed reference count. For that reason these objects can never reach reference count zero and are never deallocated. We can remove the special casing in long_dealloc. For safety we replace the check with an assert.

Has this already been discussed elsewhere?

No response given

Links to previous discussion of this feature:

No response

Linked PRs

Activity

  1. added a commit that references this issue on Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    interpreter-core(Objects, Python, Grammar, and Parser dirs)performancePerformance or resource usagetype-featureA feature request or enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions