Title: Match CPython borrow and fast-local superinstruction selection · Issue #27 · youknowone/RustPython · GitHub
Open Graph Title: Match CPython borrow and fast-local superinstruction selection · Issue #27 · youknowone/RustPython
X Title: Match CPython borrow and fast-local superinstruction selection · Issue #27 · youknowone/RustPython
Description: Summary Many remaining diffs are no longer about control-flow or constants, but about the exact local-variable opcode forms RustPython chooses. Evidence Recurring mismatches include: LOAD_FAST vs LOAD_FAST_BORROW LOAD_FAST_LOAD_FAST vs L...
Open Graph Description: Summary Many remaining diffs are no longer about control-flow or constants, but about the exact local-variable opcode forms RustPython chooses. Evidence Recurring mismatches include: LOAD_FAST vs L...
X Description: Summary Many remaining diffs are no longer about control-flow or constants, but about the exact local-variable opcode forms RustPython chooses. Evidence Recurring mismatches include: LOAD_FAST vs L...
Opengraph URL: https://github.com/youknowone/RustPython/issues/27
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Match CPython borrow and fast-local superinstruction selection","articleBody":"Summary\n\n Many remaining diffs are no longer about control-flow or constants, but about the exact local-variable opcode\n forms RustPython chooses.\n\n Evidence\n\n Recurring mismatches include:\n\n - `LOAD_FAST` vs `LOAD_FAST_BORROW`\n - `LOAD_FAST_LOAD_FAST` vs `LOAD_FAST_BORROW_LOAD_FAST_BORROW`\n - `STORE_FAST` vs `STORE_FAST_STORE_FAST`\n - `STORE_FAST_LOAD_FAST` where CPython keeps separate instructions\n\n This pattern appears across:\n\n - `Lib/test/test_buffer.py`\n - `Lib/test/test_math.py`\n - `Lib/test/test_tarfile.py`\n - `Lib/dataclasses.py`\n - `Lib/test/test_dis.py`\n\n Expected direction\n\n Borrow opcode and fused local opcode selection should follow CPython’s optimizer decisions, not a RustPython-\n specific heuristic. This should be driven by the same structural conditions CPython uses.\n\n Likely implementation areas\n\n - `crates/codegen/src/ir.rs`\n - local-op fusion and borrow/deopt logic after CFG shaping\n\n Done when\n\n Representative functions in the files above stop drifting on borrow/fused local opcodes and match CPython’s\n chosen opcode forms.","author":{"url":"https://github.com/youknowone","@type":"Person","name":"youknowone"},"datePublished":"2026-04-20T15:27:23.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/27/RustPython/issues/27"}
| 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:bf447b0e-5447-a47b-f7b1-89b3956d9d1b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CCBA:266F67:98E512B:CF356DE:6A5EC9AF |
| html-safe-nonce | 7169fb0658447860af5b02c53904a2624fb480fa189252468498efdebda77738 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQ0JBOjI2NkY2Nzo5OEU1MTJCOkNGMzU2REU6NkE1RUM5QUYiLCJ2aXNpdG9yX2lkIjoiNzcyNjQ4ODE3MjYyMTY0NjI1NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 3cf5be0654a9adc05ec8a6da4ce7b50e0be258e1a0eb7d5071b9d9ec61488dbc |
| hovercard-subject-tag | issue:4296801797 |
| 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/youknowone/RustPython/27/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ba10c795b88ee60db36090a8a648d38f4fb7c073a75ec709d321fdb297bea8a0/youknowone/RustPython/issues/27 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ba10c795b88ee60db36090a8a648d38f4fb7c073a75ec709d321fdb297bea8a0/youknowone/RustPython/issues/27 |
| og:image:alt | Summary Many remaining diffs are no longer about control-flow or constants, but about the exact local-variable opcode forms RustPython chooses. Evidence Recurring mismatches include: LOAD_FAST vs L... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | youknowone |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9bd00899c80f8b6ea4e7a96c99290af4722b0befdf9e021b19232cbd6f993660 |
| turbo-cache-control | no-preview |
| go-import | github.com/youknowone/RustPython git https://github.com/youknowone/RustPython.git |
| octolytics-dimension-user_id | 69878 |
| octolytics-dimension-user_login | youknowone |
| octolytics-dimension-repository_id | 182779261 |
| octolytics-dimension-repository_nwo | youknowone/RustPython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | true |
| octolytics-dimension-repository_parent_id | 135201145 |
| octolytics-dimension-repository_parent_nwo | RustPython/RustPython |
| octolytics-dimension-repository_network_root_id | 135201145 |
| octolytics-dimension-repository_network_root_nwo | RustPython/RustPython |
| 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 | 9996307881fdf9017d864a20b3dfe5aae4dddd3e |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width