Title: Optimize int operations by mutating uniquely-referenced operands in place (JIT only) · Issue #146640 · python/cpython · GitHub
Open Graph Title: Optimize int operations by mutating uniquely-referenced operands in place (JIT only) · Issue #146640 · python/cpython
X Title: Optimize int operations by mutating uniquely-referenced operands in place (JIT only) · Issue #146640 · python/cpython
Description: Feature or enhancement Proposal: When the tier 2 optimizer can prove that an operand to a int binary operation is uniquely referenced, we can mutate it in place instead of allocating a new object. This avoids a an int allocation and the ...
Open Graph Description: Feature or enhancement Proposal: When the tier 2 optimizer can prove that an operand to a int binary operation is uniquely referenced, we can mutate it in place instead of allocating a new object. ...
X Description: Feature or enhancement Proposal: When the tier 2 optimizer can prove that an operand to a int binary operation is uniquely referenced, we can mutate it in place instead of allocating a new object. ...
Opengraph URL: https://github.com/python/cpython/issues/146640
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Optimize int operations by mutating uniquely-referenced operands in place (JIT only)","articleBody":"# Feature or enhancement\n\n### Proposal:\n\nWhen the tier 2 optimizer can prove that an operand to a int binary operation is uniquely referenced, we can mutate it in place instead of allocating a new object. This avoids a an int allocation and the subsequent deallocation of the consumed operand on every iteration.\n\nThe approach is similar to #146307. Also see https://github.com/python/cpython/issues/90530.\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-146641\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/eendebakpt","@type":"Person","name":"eendebakpt"},"datePublished":"2026-03-30T18:20:31.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/146640/cpython/issues/146640"}
| 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:640e0ac4-3274-e532-7f67-cad232a564f6 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9ED0:22EA24:AD80FC:E86987:6A52BA1F |
| html-safe-nonce | bdd9a28c40261ec7594c359e29817a45720fd500afac9bed6d2a01982774ead7 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RUQwOjIyRUEyNDpBRDgwRkM6RTg2OTg3OjZBNTJCQTFGIiwidmlzaXRvcl9pZCI6IjIxNjQxMzI4MzcxMDM2ODAwMzEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | f59eec8a41fe35a249b0a9d9eb9340c6dfdfd814af3f2516985b577844bd5d3d |
| hovercard-subject-tag | issue:4173028163 |
| 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/146640/issue_layout |
| twitter:image | https://opengraph.githubassets.com/11de941c38a416395801e189faa794f2a7182fddcef57701f2b8ca31d701e518/python/cpython/issues/146640 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/11de941c38a416395801e189faa794f2a7182fddcef57701f2b8ca31d701e518/python/cpython/issues/146640 |
| og:image:alt | Feature or enhancement Proposal: When the tier 2 optimizer can prove that an operand to a int binary operation is uniquely referenced, we can mutate it in place instead of allocating a new object. ... |
| 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 | 07a982c1d40157c619b364352b704c3ce66bb332 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width