Title: bpo-42246: Remove DO_NOT_EMIT_BYTECODE macros, so that while loops and if statements conform to PEP 626. by markshannon · Pull Request #23743 · python/cpython · GitHub
Open Graph Title: bpo-42246: Remove DO_NOT_EMIT_BYTECODE macros, so that while loops and if statements conform to PEP 626. by markshannon · Pull Request #23743 · python/cpython
X Title: bpo-42246: Remove DO_NOT_EMIT_BYTECODE macros, so that while loops and if statements conform to PEP 626. by markshannon · Pull Request #23743 · python/cpython
Description: PEP 626 requires all expressions and statements to be traced, even if the code is redundant. This PR does that for while and if statements. The performance impact on while 1: loops is minimized by copying the test to the end of the loop. while test: body used to compile to: start: if not test: goto end body goto start end: It now compiles to: if not test: goto end loop: body if test goto loop end: which will be a tiny bit slower for while 1 loops and a bit faster for other while loops. I'm skipping news, as this PR is part of PEP 626 and is covered by that. https://bugs.python.org/issue42246
Open Graph Description: PEP 626 requires all expressions and statements to be traced, even if the code is redundant. This PR does that for while and if statements. The performance impact on while 1: loops is minimized by ...
X Description: PEP 626 requires all expressions and statements to be traced, even if the code is redundant. This PR does that for while and if statements. The performance impact on while 1: loops is minimized by ...
Opengraph URL: https://github.com/python/cpython/pull/23743
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:7467833d-857b-c710-ca0b-889980cc0766 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | A35A:319547:B66A8D:EADE59:696AFC9E |
| html-safe-nonce | 14b9b8abe4a45f99fa8a3ada738898d73a1f9aa05bdf8d53953ed7740ac0b57f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMzVBOjMxOTU0NzpCNjZBOEQ6RUFERTU5OjY5NkFGQzlFIiwidmlzaXRvcl9pZCI6IjM1MzUwMjUxMDAxOTg0NDQxOTAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | b367eff065dd07e388da15f8cd05314c7ccade9232a1d6164d87c7299998affb |
| hovercard-subject-tag | pull_request:536954679 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,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/python/cpython/pull/23743/files |
| twitter:image | https://avatars.githubusercontent.com/u/9448417?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/9448417?s=400&v=4 |
| og:image:alt | PEP 626 requires all expressions and statements to be traced, even if the code is redundant. This PR does that for while and if statements. The performance impact on while 1: loops is minimized by ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d |
| turbo-cache-control | no-preview |
| diff-view | unified |
| 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 full-width |
| disable-turbo | true |
| 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