Title: Make implicit boolean conversions explicit · Issue #106008 · python/cpython · GitHub
Open Graph Title: Make implicit boolean conversions explicit · Issue #106008 · python/cpython
X Title: Make implicit boolean conversions explicit · Issue #106008 · python/cpython
Description: ...as discussed in faster-cpython/ideas#568. By adding a dedicated instruction for converting values to bool, we can easily specialize the conditions of all remaining branches in the bytecode while keeping the branches themselves as "dum...
Open Graph Description: ...as discussed in faster-cpython/ideas#568. By adding a dedicated instruction for converting values to bool, we can easily specialize the conditions of all remaining branches in the bytecode while...
X Description: ...as discussed in faster-cpython/ideas#568. By adding a dedicated instruction for converting values to bool, we can easily specialize the conditions of all remaining branches in the bytecode while...
Opengraph URL: https://github.com/python/cpython/issues/106008
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Make implicit boolean conversions explicit","articleBody":"...as discussed in https://github.com/faster-cpython/ideas/issues/568.\r\n\r\nBy adding a dedicated instruction for converting values to bool, we can easily specialize the conditions of all remaining branches in the bytecode while keeping the branches themselves as \"dumb\" and simple as possible.\r\n\r\nThis is one of the few remaining common cases where a little specilization will give us a lot of useful information (such as \"this branch won't execute arbitrary code\") for higher tiers of optimization. Plus, the most common specializations (such as for `bool` or `None`) will be effectively no-ops.\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-106003\n* gh-106367\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/brandtbucher","@type":"Person","name":"brandtbucher"},"datePublished":"2023-06-23T02:41:16.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/106008/cpython/issues/106008"}
| 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:d237a5de-b21f-8f76-c6c9-5cd1f4a023dd |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D93C:2ACFDC:172C30F:1F1E5A6:6969BEC3 |
| html-safe-nonce | fde4a47839a536adcd8716b2ea5241224985e5d67736ffcc4a2f423d9b3b552a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEOTNDOjJBQ0ZEQzoxNzJDMzBGOjFGMUU1QTY6Njk2OUJFQzMiLCJ2aXNpdG9yX2lkIjoiMTMzOTk1MDIyODI5MzM4MzA3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | af4d0a400a592c625024a536d06d342d5ed51f01f428f7550757e1699bca72ba |
| hovercard-subject-tag | issue:1770685893 |
| 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/106008/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e19ba9aba61597197aaea36ba83256180aee1c816ddd147036873e5f5488c2ec/python/cpython/issues/106008 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e19ba9aba61597197aaea36ba83256180aee1c816ddd147036873e5f5488c2ec/python/cpython/issues/106008 |
| og:image:alt | ...as discussed in faster-cpython/ideas#568. By adding a dedicated instruction for converting values to bool, we can easily specialize the conditions of all remaining branches in the bytecode while... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | brandtbucher |
| hostname | github.com |
| expected-hostname | github.com |
| None | acedec8b5f975d9e3d494ddd8f949b0b8a0de59d393901e26f73df9dcba80056 |
| 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 | 83c08c21cdda978090dc44364b71aa5bc6dcea79 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width