Title: Remove redundant decref from _PyLong_Negate · Issue #143050 · python/cpython · GitHub
Open Graph Title: Remove redundant decref from _PyLong_Negate · Issue #143050 · python/cpython
X Title: Remove redundant decref from _PyLong_Negate · Issue #143050 · python/cpython
Description: Feature or enhancement Proposal: In _PyLong_Negate there is a fast path for unique referenced longs. The slow path assumes the argument is a small int. We can add an assert for this condition, and remove the final decref (small ints are ...
Open Graph Description: Feature or enhancement Proposal: In _PyLong_Negate there is a fast path for unique referenced longs. The slow path assumes the argument is a small int. We can add an assert for this condition, and ...
X Description: Feature or enhancement Proposal: In _PyLong_Negate there is a fast path for unique referenced longs. The slow path assumes the argument is a small int. We can add an assert for this condition, and ...
Opengraph URL: https://github.com/python/cpython/issues/143050
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Remove redundant decref from _PyLong_Negate","articleBody":"# Feature or enhancement\n\n### Proposal:\n\nIn `_PyLong_Negate` there is a fast path for unique referenced longs. The slow path assumes the argument is a small int. We can add an assert for this condition, and remove the final decref (small ints are immortal).\n\n\n### Has this already been discussed elsewhere?\n\nNo response given\n\n### Links to previous discussion of this feature:\n\n_No response_\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-143051\n* gh-145891\n* gh-145901\n* gh-147331\n* gh-147437\n* gh-147956\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/eendebakpt","@type":"Person","name":"eendebakpt"},"datePublished":"2025-12-21T20:25:26.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":14},"url":"https://github.com/143050/cpython/issues/143050"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:c36ea650-4281-4b0b-c46f-1518e62536dd |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D4F6:2E8F47:41C33D:5A45FD:6A5249D2 |
| html-safe-nonce | f68ffd489e73e4601759859308dbd986b0d701cd1a4bd244cce5196597965ef0 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENEY2OjJFOEY0Nzo0MUMzM0Q6NUE0NUZEOjZBNTI0OUQyIiwidmlzaXRvcl9pZCI6IjUyODAxMzMzMTU0NTM2Njc3OTQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | d5d2ee0c5f0f9d4c68a6171a91a78960fc032a1346bc39556650a779ed59d816 |
| hovercard-subject-tag | issue:3751575619 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/143050/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1d90cfcf871b26732c28084fda867fd4ddaa001381589cad99a0eebc1634f407/python/cpython/issues/143050 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1d90cfcf871b26732c28084fda867fd4ddaa001381589cad99a0eebc1634f407/python/cpython/issues/143050 |
| og:image:alt | Feature or enhancement Proposal: In _PyLong_Negate there is a fast path for unique referenced longs. The slow path assumes the argument is a small int. We can add an assert for this condition, and ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | eendebakpt |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7aed05249554b889eb33d002851a973eebcc7e91 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width