Title: Convert more uops to leave their inputs on the stack to be cleaned up by `_POP_TOP` · Issue #145866 · python/cpython · GitHub
Open Graph Title: Convert more uops to leave their inputs on the stack to be cleaned up by `_POP_TOP` · Issue #145866 · python/cpython
X Title: Convert more uops to leave their inputs on the stack to be cleaned up by `_POP_TOP` · Issue #145866 · python/cpython
Description: Feature or enhancement Proposal: This is a follow up to #134584 We have, in the JIT, optimizations to eliminate many _POP_TOP operations. To take advantage of that we have converted many uops to leave their operands on the stack and adde...
Open Graph Description: Feature or enhancement Proposal: This is a follow up to #134584 We have, in the JIT, optimizations to eliminate many _POP_TOP operations. To take advantage of that we have converted many uops to le...
X Description: Feature or enhancement Proposal: This is a follow up to #134584 We have, in the JIT, optimizations to eliminate many _POP_TOP operations. To take advantage of that we have converted many uops to le...
Opengraph URL: https://github.com/python/cpython/issues/145866
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Convert more uops to leave their inputs on the stack to be cleaned up by `_POP_TOP`","articleBody":"# Feature or enhancement\n\n### Proposal:\n\nThis is a follow up to https://github.com/python/cpython/issues/134584\n\nWe have, in the JIT, optimizations to eliminate many `_POP_TOP` operations. To take advantage of that we have converted many uops to leave their operands on the stack and added subsequent `_POP_TOP`s to remove them.\nSee https://github.com/python/cpython/issues/134584 for many examples of how to do this and why it works.\n\nHowever, there are still a few uops yet to do. These are:\n* LIST_EXTEND\n* DICT_UPDATE @Sacul0457\n* SET_UPDATE @Sacul0457\n* DICT_MERGE @NekoAsakura\n* CALL_INTRINSIC_1 @Sacul0457\n* CALL_INTRINSIC_2 @KevinH15291\n\nIn addition, `POP_ITER`, `END_FOR` and `END_SEND` can be implemented as macro ops, using `POP_TOP` to gain the benefit of the the `POP_TOP` optimization.\n\n\n### Has this already been discussed elsewhere?\n\n\nThis is a minor feature, which does not need previous discussion elsewhere\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-145964\n* gh-145979\n* gh-146170\n* gh-146177\n* gh-146185\n* gh-146190\n* gh-146262\n* gh-146329\n* gh-146383\n* gh-148227\n* gh-148477\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/markshannon","@type":"Person","name":"markshannon"},"datePublished":"2026-03-12T13:58:37.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":21},"url":"https://github.com/145866/cpython/issues/145866"}
| 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:bc446b7d-1276-b0ca-a881-79a4907901b3 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9A7C:4FAAE:6695DA1:908C8D3:6A50F6DA |
| html-safe-nonce | 6f78828b893e54fad4f0e4f54b5bab61ff7b399de3d8eaf5a388679b3b208adb |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QTdDOjRGQUFFOjY2OTVEQTE6OTA4QzhEMzo2QTUwRjZEQSIsInZpc2l0b3JfaWQiOiIzMzg3NzMxMDUyMjIzMDY3ODY2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 417d673f24f1c50f10ccaa274b596162315bb4a8f245e830a511636b1f0d1083 |
| hovercard-subject-tag | issue:4064868208 |
| 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/145866/issue_layout |
| twitter:image | https://opengraph.githubassets.com/80c2d5f8b633f800d7b59c12f19b11e448fb236cc72e1523fe343b113c9dccbc/python/cpython/issues/145866 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/80c2d5f8b633f800d7b59c12f19b11e448fb236cc72e1523fe343b113c9dccbc/python/cpython/issues/145866 |
| og:image:alt | Feature or enhancement Proposal: This is a follow up to #134584 We have, in the JIT, optimizations to eliminate many _POP_TOP operations. To take advantage of that we have converted many uops to le... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | markshannon |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5266e58c17a510c403505cc811606465e90a881d2007ee7df1c4800d5c659838 |
| 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 | 8d836581d020676cc0ef4a83cd2fe17e4af02c3d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width