Title: JIT optimizer cleanups · Issue #143421 · python/cpython · GitHub
Open Graph Title: JIT optimizer cleanups · Issue #143421 · python/cpython
X Title: JIT optimizer cleanups · Issue #143421 · python/cpython
Description: Feature or enhancement Proposal: Currently the JIT uop buffer modifies uops traces in place. I think we should make it add to a new buffer. Having modifications be in-place is making our code messy and full of special cases. So REPLACE_O...
Open Graph Description: Feature or enhancement Proposal: Currently the JIT uop buffer modifies uops traces in place. I think we should make it add to a new buffer. Having modifications be in-place is making our code messy...
X Description: Feature or enhancement Proposal: Currently the JIT uop buffer modifies uops traces in place. I think we should make it add to a new buffer. Having modifications be in-place is making our code messy...
Opengraph URL: https://github.com/python/cpython/issues/143421
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":" JIT optimizer cleanups","articleBody":"# Feature or enhancement\n\n### Proposal:\n\nCurrently the JIT uop buffer modifies uops traces in place.\n\nI think we should make it add to a new buffer. Having modifications be in-place is making our code messy and full of special cases.\n\nSo\n```\nREPLACE_OP(this_instr, ...)\n```\nshould become\n```\nADD_OP(ctx, ...)\n```\n\nin `optimizer_bytecodes.c`,\n\nAlso, the default generated case of optimizer_bytecodes.c should be to `ADD_OP(pc, ...)`\n\nThis is also blocking optimization in https://github.com/python/cpython/issues/143414, as ocassionally we need to insert extra guards to check the uniqueness of an object for example.\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-143536\n* gh-143597\n* gh-143626\n* gh-143682\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/Fidget-Spinner","@type":"Person","name":"Fidget-Spinner"},"datePublished":"2026-01-04T21:44:35.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/143421/cpython/issues/143421"}
| 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:1b545102-3b33-5c25-86d4-87e447262690 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CD16:19782E:15839DC:1CA2047:69706621 |
| html-safe-nonce | c53e46735a4c2083af8a3fa0024cc0be0a3f07bc4a099a0535f6abb827e88ff8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRDE2OjE5NzgyRToxNTgzOURDOjFDQTIwNDc6Njk3MDY2MjEiLCJ2aXNpdG9yX2lkIjoiMTAxMDEwNDIxNDQ2NzE0MzIwMSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | fa5c8609b55e0d644803be61fbcbec8957a2b7539fbe6b8d0dd129f56c386cbc |
| hovercard-subject-tag | issue:3779676300 |
| 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/143421/issue_layout |
| twitter:image | https://opengraph.githubassets.com/25fad5e5b232ad3d91bba82cbdab60be29b84c99987480c2037f1972cde6cce0/python/cpython/issues/143421 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/25fad5e5b232ad3d91bba82cbdab60be29b84c99987480c2037f1972cde6cce0/python/cpython/issues/143421 |
| og:image:alt | Feature or enhancement Proposal: Currently the JIT uop buffer modifies uops traces in place. I think we should make it add to a new buffer. Having modifications be in-place is making our code messy... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Fidget-Spinner |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9920a62ba22d06470388e2904804fb7e5ec51c9e35f81784e9191394c74b2bd2 |
| 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 | 7d6181066430cc06553c8396ca201e194ae33cb9 |
| ui-target | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width