GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Remove redundant small int check in long_dealloc · Issue #127119 · python/cpython

Remove redundant small int check in long_dealloc #127119

New issue
Copy link
New issue
Copy link
Closed
Closed
Remove redundant small int check in long_dealloc#127119
Copy link
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)performancePerformance or resource usagePerformance or resource usagetype-featureA feature request or enhancementA feature request or enhancement

Description

@eendebakpt
eendebakpt
opened on Nov 21, 2024
Issue body actions

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

  • gh-127119: Remove check on accidental deallocation of immortal objects for free-threaded build #127120
  • gh-127119: Faster check for small ints in long_dealloc #127620
  • Draft: gh-127119: Faster check for small ints in long_dealloc (debug) #128187

Activity

  1. eendebakpt
    added
    type-featureA feature request or enhancementA feature request or enhancement
    on Nov 21, 2024
  2. terryjreedy
    added
    interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)
    on Nov 21, 2024
  3. picnixz
    added
    performancePerformance or resource usagePerformance or resource usage
    on Dec 5, 2024
  4. markshannon
    added a commit that references this issue on Jan 29, 2025

    gh-127119: Faster check for small ints in long_dealloc (GH-127620)

    a292216
  5. hugovk
    closed this as completedon Feb 17, 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)(Objects, Python, Grammar, and Parser dirs)performancePerformance or resource usagePerformance or resource usagetype-featureA feature request or enhancementA feature request or enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.