Title: Enable specialization of iteration over generators, `for gen():`, and awaiting coroutines, `await coro()` · Issue #96793 · python/cpython · GitHub
Open Graph Title: Enable specialization of iteration over generators, `for gen():`, and awaiting coroutines, `await coro()` · Issue #96793 · python/cpython
X Title: Enable specialization of iteration over generators, `for gen():`, and awaiting coroutines, `await coro()` · Issue #96793 · python/cpython
Description: We want to be able to specialize iteration over generators and awaiting coroutines. Both for PEP 659 and for higher tier optimizers. For the theory see faster-cpython/ideas#457 To do this we need: Shim frames to keep the various returns ...
Open Graph Description: We want to be able to specialize iteration over generators and awaiting coroutines. Both for PEP 659 and for higher tier optimizers. For the theory see faster-cpython/ideas#457 To do this we need: ...
X Description: We want to be able to specialize iteration over generators and awaiting coroutines. Both for PEP 659 and for higher tier optimizers. For the theory see faster-cpython/ideas#457 To do this we need: ...
Opengraph URL: https://github.com/python/cpython/issues/96793
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Enable specialization of iteration over generators, `for gen():`, and awaiting coroutines, `await coro()`","articleBody":"We want to be able to specialize iteration over generators and awaiting coroutines. Both for PEP 659 and for higher tier optimizers.\r\n\r\nFor the theory see https://github.com/faster-cpython/ideas/issues/457\r\n\r\nTo do this we need:\r\n\r\n- [x] Shim frames to keep the various returns simple https://github.com/python/cpython/pull/96319\r\n- [x] Modify `FOR_ITER` to leave iterator and value on the stack when exiting https://github.com/python/cpython/pull/96801\r\n- [x] Implement specialization of `FOR_ITER` for generators https://github.com/python/cpython/pull/98772\r\n- [x] Implement specialization of `SEND` for coroutines\r\n\r\n\r\n\r\nEdited:\r\nRemove the requirement for a `GEN_RETURN_VALUE` instruction. We might want one to simplify frame popping, but it isn't needed for specializing.\n\n\u003c!-- gh-pr-number: gh-99006 --\u003e\n* PR: gh-99006\n\u003c!-- /gh-pr-number --\u003e\n\n\n\u003c!-- gh-pr-number: gh-98772 --\u003e\n* PR: gh-98772\n\u003c!-- /gh-pr-number --\u003e\n","author":{"url":"https://github.com/markshannon","@type":"Person","name":"markshannon"},"datePublished":"2022-09-13T11:51:35.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/96793/cpython/issues/96793"}
| 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:25efbdc6-4715-815e-43e9-627a1f3450c1 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C8C4:258BE8:26F206D:335EA57:696B2190 |
| html-safe-nonce | f1d4b93e876c51ad5d40829b1a46d1448dd1156b98c72fc785e661b30d7c15d0 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDOEM0OjI1OEJFODoyNkYyMDZEOjMzNUVBNTc6Njk2QjIxOTAiLCJ2aXNpdG9yX2lkIjoiNTkxODE1MjY3NDM1NDM0MDI0MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 5a98bd8b21121ef264fce86bc7f8782ca42b1384644842634cc0606d26dc5e96 |
| hovercard-subject-tag | issue:1371326138 |
| 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/96793/issue_layout |
| twitter:image | https://opengraph.githubassets.com/9313a6179d00fa4fea9561a7c4f52cfb871c361ab9f3ca2a56238c1fcc11055a/python/cpython/issues/96793 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9313a6179d00fa4fea9561a7c4f52cfb871c361ab9f3ca2a56238c1fcc11055a/python/cpython/issues/96793 |
| og:image:alt | We want to be able to specialize iteration over generators and awaiting coroutines. Both for PEP 659 and for higher tier optimizers. For the theory see faster-cpython/ideas#457 To do this we need: ... |
| 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 | 5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d |
| 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 | 82560a55c6b2054555076f46e683151ee28a19bc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width