René's URL Explorer Experiment


Title: GH-120507: Lower the `BEFORE_WITH` and `BEFORE_ASYNC_WITH` instructions. by markshannon · Pull Request #120640 · python/cpython · GitHub

Open Graph Title: GH-120507: Lower the `BEFORE_WITH` and `BEFORE_ASYNC_WITH` instructions. by markshannon · Pull Request #120640 · python/cpython

X Title: GH-120507: Lower the `BEFORE_WITH` and `BEFORE_ASYNC_WITH` instructions. by markshannon · Pull Request #120640 · python/cpython

Description: Removes the BEFORE_WITH and BEFORE_ASYNC_WITH instructions, adding the new LOAD_SPECIAL instruction. BEFORE_WITH becomes COPY 1 LOAD_SPECIAL 1 SWAP 2 SWAP 3 LOAD_SPECIAL 0 CALL 0 which may seem rather a lot, but it is much more amenable to optimization. Negligible performance impact Issue: gh-120507

Open Graph Description: Removes the BEFORE_WITH and BEFORE_ASYNC_WITH instructions, adding the new LOAD_SPECIAL instruction. BEFORE_WITH becomes COPY 1 LOAD_SPECIAL 1 SWAP ...

X Description: Removes the BEFORE_WITH and BEFORE_ASYNC_WITH instructions, adding the new LOAD_SPECIAL instruction. BEFORE_WITH becomes COPY 1 LOAD_SPECIAL 1 SWAP ...

Opengraph URL: https://github.com/python/cpython/pull/120640

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:b42b7778-64ac-5cea-e357-599537c6f51f
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idD0CC:1ED8:3E8FD3:5476DE:6B023C8C
html-safe-noncea5d1d3e02bf502072e853b5b7b80fc70765c452b704613c1ce74b9f97b160a8a
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMENDOjFFRDg6M0U4RkQzOjU0NzZERTo2QjAyM0M4QyIsInZpc2l0b3JfaWQiOiI1NjcxNzQxNDU4NDg3NTkwMDI4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmace1a2cd540c461dae4e10c815bc8b3a9ce453bfa0b50cd4a69e56f99df4d3a202
hovercard-subject-tagpull_request:1924283001
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/python/cpython/pull/120640/files
twitter:imagehttps://avatars.githubusercontent.com/u/9448417?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/9448417?s=400&v=4
og:image:altRemoves the BEFORE_WITH and BEFORE_ASYNC_WITH instructions, adding the new LOAD_SPECIAL instruction. BEFORE_WITH becomes COPY 1 LOAD_SPECIAL 1 SWAP ...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/python/cpython git https://github.com/python/cpython.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id81598961
octolytics-dimension-repository_nwopython/cpython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id81598961
octolytics-dimension-repository_network_root_nwopython/cpython
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release423dbb54c5e7bfecc838eb387c1435eb3d0e760d
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/120640/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F120640%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F120640%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/pull/120640/files
Reloadhttps://github.com/python/cpython/pull/120640/files
Reloadhttps://github.com/python/cpython/pull/120640/files
pythonhttps://github.com/python
cpythonhttps://github.com/python/cpython
Codehttps://github.com/python/cpython
Issues5k+ (5k+)https://github.com/python/cpython/issues
Pull requests2.4k (2.4k)https://github.com/python/cpython/pulls
Actionshttps://github.com/python/cpython/actions
Projectshttps://github.com/python/cpython/projects
Security and qualityhttps://github.com/python/cpython/security
Insightshttps://github.com/python/cpython/insights
Sign up for GitHub https://github.com/signup?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
markshannonhttps://github.com/markshannon
python:mainhttps://github.com/python/cpython/tree/main
faster-cpython:lower-beforehttps://github.com/faster-cpython/cpython/tree/lower-before
Conversation 8 https://github.com/python/cpython/pull/120640
Commits 11 https://github.com/python/cpython/pull/120640/commits
Checks 0 https://github.com/python/cpython/pull/120640/checks
Files changed https://github.com/python/cpython/pull/120640/files
Please reload this pagehttps://github.com/python/cpython/pull/120640/files
GH-120507: Lower the BEFORE_WITH and BEFORE_ASYNC_WITH instructions. https://github.com/python/cpython/pull/120640/files#top
Show all changes 11 commits https://github.com/python/cpython/pull/120640/files
e0584b5 Lower BEFORE_WITH and BEFORE_ASYNC_WITH markshannon Jun 17, 2024 https://github.com/python/cpython/pull/120640/commits/e0584b54445d32364a18bdb0ad5f53af30e69b92
0b336e2 Merge branch 'main' into lower-before markshannon Jun 17, 2024 https://github.com/python/cpython/pull/120640/commits/0b336e28da849fd50328820a46527373b953315d
68df0a5 Remove BEFORE_ instructions. markshannon Jun 17, 2024 https://github.com/python/cpython/pull/120640/commits/68df0a5b19c69d3446b24b682549878591fb76a9
69db48b Don't store special method names in co_consts and fix error messages markshannon Jun 17, 2024 https://github.com/python/cpython/pull/120640/commits/69db48b6f684968dcebc2af1a76625973a9625ab
362b63f Add news markshannon Jun 17, 2024 https://github.com/python/cpython/pull/120640/commits/362b63ffb71e0544bcb31455f3f7170e9a45e6c1
103dbf0 Expose _PyObject_LookupSpecialMethod, so the JIT can find it. markshannon Jun 17, 2024 https://github.com/python/cpython/pull/120640/commits/103dbf05e582ec20912d35eab49c80694a80e0a3
9494426 Update test_dis markshannon Jun 17, 2024 https://github.com/python/cpython/pull/120640/commits/9494426a68e4c4d1518cac2695c496abf6e13971
ca76570 Update dis.rst markshannon Jun 17, 2024 https://github.com/python/cpython/pull/120640/commits/ca765705f2669c24a5ce7e5b47ce17c521ec783a
8cad898 Don't use :opcode: for removed instructions. It confuses Sphinx. markshannon Jun 17, 2024 https://github.com/python/cpython/pull/120640/commits/8cad898576a8ac47ce5dee7a572d4ddb96d4f986
d7797dc Merge branch 'main' into lower-before markshannon Jun 18, 2024 https://github.com/python/cpython/pull/120640/commits/d7797dc7ff5c32c9147616803508244fcc446f17
ec2b7c6 Make explicit that LOAD_SPECIAL may push a NULL. markshannon Jun 18, 2024 https://github.com/python/cpython/pull/120640/commits/ec2b7c676c4c2e3cd93b16c95b6550187b578926
Clear filters https://github.com/python/cpython/pull/120640/files
Please reload this pagehttps://github.com/python/cpython/pull/120640/files
Please reload this pagehttps://github.com/python/cpython/pull/120640/files
dis.rst https://github.com/python/cpython/pull/120640/files#diff-eaa488fc50d23b30ca8b24ab19e9c91c1c941339847af993e908f006eec0653b
ceval.h https://github.com/python/cpython/pull/120640/files#diff-ebdfffaf18bedcdb18ef52479aec307e5f9853560ebaabc481808e84458a1400
pycore_ceval.h https://github.com/python/cpython/pull/120640/files#diff-9e7eb7e81667528dfa3a35bbf32fe622d4721c3c71385ea0ea2250abbd15d545
pycore_object.h https://github.com/python/cpython/pull/120640/files#diff-2a12f738a77b362d74a65949b58c37f2affcd15ba8b1c979b63bd00223b8a456
pycore_opcode_metadata.h https://github.com/python/cpython/pull/120640/files#diff-72bc4c0445516cc3eabd536220b2459617491ffaabbdb8a7c5381f36c991e378
pycore_uop_ids.h https://github.com/python/cpython/pull/120640/files#diff-2a420e4d0d58009249c0f73f7c822167b053bd51cb213b20179bd2aebfc66ff9
pycore_uop_metadata.h https://github.com/python/cpython/pull/120640/files#diff-55e65a72fa31e9b746e03076d2c74b716c0c1171663f36960b2339fcbfae9bab
opcode_ids.h https://github.com/python/cpython/pull/120640/files#diff-e4ecf20b65dcacb3c91fc910b83d99a2ca60282b51aa65e7902a662c227e6187
_opcode_metadata.py https://github.com/python/cpython/pull/120640/files#diff-3f2acff9cdbb005de538e3ba43dc12406bf414047d7d018476bac0048b5056e4
_bootstrap_external.py https://github.com/python/cpython/pull/120640/files#diff-efefe383b3a81d16150c280db0b64eed7569254299418f64cc0d749f8e16f3a4
test_dis.py https://github.com/python/cpython/pull/120640/files#diff-fd7b118a01a9695dfa16eea9381d3c7b0652e1b7b55f51ff052a1f620d175642
2024-06-17-12-20-20.gh-issue-120507.94lz2J.rst https://github.com/python/cpython/pull/120640/files#diff-c006d88abdf56e1295ed3050fcf886c174b684d7d1715e65d210e012a1daece9
typeobject.c https://github.com/python/cpython/pull/120640/files#diff-1decebeef15f4e0b0ce106c665751ec55068d4d1d1825847925ad4f528b5b872
test_frozenmain.h https://github.com/python/cpython/pull/120640/files#diff-dcbbf153f77c69fb3a08746516bb9baaf46b9465c941221d1d495123e92cc862
bytecodes.c https://github.com/python/cpython/pull/120640/files#diff-729a985b0cb8b431cb291f1edb561bbbfea22e3f8c262451cd83328a0936a342
ceval.c https://github.com/python/cpython/pull/120640/files#diff-c22186367cbe20233e843261998dc027ae5f1f8c0d2e778abfa454ae74cc59de
compile.c https://github.com/python/cpython/pull/120640/files#diff-ebc983d9f91e5bcf73500e377ac65e85863c4f77fd5b6b6caf4fcdf7c0f0b057
executor_cases.c.h https://github.com/python/cpython/pull/120640/files#diff-a1c3430c42a66c16e6d2e154491a6da993b187b27c628545a12a02c7b2a06b81
generated_cases.c.h https://github.com/python/cpython/pull/120640/files#diff-4ef46fa654f95502e49a24f7dc8ee31a4cac9b3433fe9cd2b2d4dd78cfbad448
opcode_targets.h https://github.com/python/cpython/pull/120640/files#diff-d3363a4083b77b9157d0bf07c2e87f3d3464a8b4360d5d23b07bbb23061f007a
optimizer_bytecodes.c https://github.com/python/cpython/pull/120640/files#diff-e5bd2b14b0b10f0f47786e26306d689ed1361c3dc3b11dcc3ea52b8a2422ff64
optimizer_cases.c.h https://github.com/python/cpython/pull/120640/files#diff-ed4567b3e67709ec57bf4df91ef058cfcbe00d7da11cd2a75e38241fa1ca99d2
Doc/library/dis.rsthttps://github.com/python/cpython/pull/120640/files#diff-eaa488fc50d23b30ca8b24ab19e9c91c1c941339847af993e908f006eec0653b
View file https://github.com/faster-cpython/cpython/blob/ec2b7c676c4c2e3cd93b16c95b6550187b578926/Doc/library/dis.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/120640/{{ revealButtonHref }}
https://github.com/python/cpython/pull/120640/files#diff-eaa488fc50d23b30ca8b24ab19e9c91c1c941339847af993e908f006eec0653b
https://github.com/python/cpython/pull/120640/files#diff-eaa488fc50d23b30ca8b24ab19e9c91c1c941339847af993e908f006eec0653b
https://github.com/python/cpython/pull/120640/files#diff-eaa488fc50d23b30ca8b24ab19e9c91c1c941339847af993e908f006eec0653b
https://github.com/python/cpython/pull/120640/files#diff-eaa488fc50d23b30ca8b24ab19e9c91c1c941339847af993e908f006eec0653b
https://github.com/python/cpython/pull/120640/files#diff-eaa488fc50d23b30ca8b24ab19e9c91c1c941339847af993e908f006eec0653b
https://github.com/python/cpython/pull/120640/files#diff-eaa488fc50d23b30ca8b24ab19e9c91c1c941339847af993e908f006eec0653b
Include/ceval.hhttps://github.com/python/cpython/pull/120640/files#diff-ebdfffaf18bedcdb18ef52479aec307e5f9853560ebaabc481808e84458a1400
View file https://github.com/faster-cpython/cpython/blob/ec2b7c676c4c2e3cd93b16c95b6550187b578926/Include/ceval.h
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/120640/{{ revealButtonHref }}
https://github.com/python/cpython/pull/120640/files#diff-ebdfffaf18bedcdb18ef52479aec307e5f9853560ebaabc481808e84458a1400
https://github.com/python/cpython/pull/120640/files#diff-ebdfffaf18bedcdb18ef52479aec307e5f9853560ebaabc481808e84458a1400
Include/internal/pycore_ceval.hhttps://github.com/python/cpython/pull/120640/files#diff-9e7eb7e81667528dfa3a35bbf32fe622d4721c3c71385ea0ea2250abbd15d545
View file https://github.com/faster-cpython/cpython/blob/ec2b7c676c4c2e3cd93b16c95b6550187b578926/Include/internal/pycore_ceval.h
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/120640/{{ revealButtonHref }}
https://github.com/python/cpython/pull/120640/files#diff-9e7eb7e81667528dfa3a35bbf32fe622d4721c3c71385ea0ea2250abbd15d545
https://github.com/python/cpython/pull/120640/files#diff-9e7eb7e81667528dfa3a35bbf32fe622d4721c3c71385ea0ea2250abbd15d545
Include/internal/pycore_object.hhttps://github.com/python/cpython/pull/120640/files#diff-2a12f738a77b362d74a65949b58c37f2affcd15ba8b1c979b63bd00223b8a456
View file https://github.com/faster-cpython/cpython/blob/ec2b7c676c4c2e3cd93b16c95b6550187b578926/Include/internal/pycore_object.h
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/120640/{{ revealButtonHref }}
https://github.com/python/cpython/pull/120640/files#diff-2a12f738a77b362d74a65949b58c37f2affcd15ba8b1c979b63bd00223b8a456
https://github.com/python/cpython/pull/120640/files#diff-2a12f738a77b362d74a65949b58c37f2affcd15ba8b1c979b63bd00223b8a456
Include/internal/pycore_opcode_metadata.hhttps://github.com/python/cpython/pull/120640/files#diff-72bc4c0445516cc3eabd536220b2459617491ffaabbdb8a7c5381f36c991e378
View file https://github.com/faster-cpython/cpython/blob/ec2b7c676c4c2e3cd93b16c95b6550187b578926/Include/internal/pycore_opcode_metadata.h
Open in desktop https://desktop.github.com
how customized files appear on GitHubhttps://docs.github.com/github/administering-a-repository/customizing-how-changed-files-appear-on-github
Please reload this pagehttps://github.com/python/cpython/pull/120640/files
Include/internal/pycore_uop_ids.hhttps://github.com/python/cpython/pull/120640/files#diff-2a420e4d0d58009249c0f73f7c822167b053bd51cb213b20179bd2aebfc66ff9
View file https://github.com/faster-cpython/cpython/blob/ec2b7c676c4c2e3cd93b16c95b6550187b578926/Include/internal/pycore_uop_ids.h
Open in desktop https://desktop.github.com
how customized files appear on GitHubhttps://docs.github.com/github/administering-a-repository/customizing-how-changed-files-appear-on-github
Please reload this pagehttps://github.com/python/cpython/pull/120640/files
Include/internal/pycore_uop_metadata.hhttps://github.com/python/cpython/pull/120640/files#diff-55e65a72fa31e9b746e03076d2c74b716c0c1171663f36960b2339fcbfae9bab
View file https://github.com/faster-cpython/cpython/blob/ec2b7c676c4c2e3cd93b16c95b6550187b578926/Include/internal/pycore_uop_metadata.h
Open in desktop https://desktop.github.com
how customized files appear on GitHubhttps://docs.github.com/github/administering-a-repository/customizing-how-changed-files-appear-on-github
Please reload this pagehttps://github.com/python/cpython/pull/120640/files
Please reload this pagehttps://github.com/python/cpython/pull/120640/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.