René's URL Explorer Experiment


Title: Lower `BEFORE_WITH` and `BEFORE_ASYNC_WITH` to attribute lookups and calls. · Issue #120507 · python/cpython · GitHub

Open Graph Title: Lower `BEFORE_WITH` and `BEFORE_ASYNC_WITH` to attribute lookups and calls. · Issue #120507 · python/cpython

X Title: Lower `BEFORE_WITH` and `BEFORE_ASYNC_WITH` to attribute lookups and calls. · Issue #120507 · python/cpython

Description: With the JIT and better tier 2 optimizations, effective specialization is becoming more important that plain speed in tier 1. BEFORE_WITH and BEFORE_ASYNC_WITH could be specialized, but they are bulky and won't optimize well in tier 2. I...

Open Graph Description: With the JIT and better tier 2 optimizations, effective specialization is becoming more important that plain speed in tier 1. BEFORE_WITH and BEFORE_ASYNC_WITH could be specialized, but they are bu...

X Description: With the JIT and better tier 2 optimizations, effective specialization is becoming more important that plain speed in tier 1. BEFORE_WITH and BEFORE_ASYNC_WITH could be specialized, but they are bu...

Opengraph URL: https://github.com/python/cpython/issues/120507

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Lower `BEFORE_WITH` and `BEFORE_ASYNC_WITH` to attribute lookups and calls.","articleBody":"With the JIT and better tier 2 optimizations, effective specialization is becoming more important that plain speed in tier 1.\r\n\r\n`BEFORE_WITH` and `BEFORE_ASYNC_WITH` could be specialized, but they are bulky and won't optimize well in tier 2.\r\nInstead, we should lower them to attribute lookups and calls which can then be optimized.\r\nWe should add a `LOAD_SPECIAL` instruction for loading dunder methods and replace `BEFORE_WITH` as follows:\r\n```\r\n    COPY 1\r\n    LOAD_SPECIAL __enter__ + NULL|self\r\n    SWAP 3\r\n    LOAD_SPECIAL __exit__\r\n    SWAP 3\r\n    CALL 0\r\n```\r\nLikewise for `BEFORE_ASYNC_WITH`.\r\n\r\nEven without any specialization of `LOAD_SPECIAL`, the `CALL` will be specialized and the JIT can eliminate the `COPY` and `SWAP`s.\r\n\n\n\u003c!-- gh-linked-prs -->\n### Linked PRs\n* gh-120640\n* gh-120648\n\u003c!-- /gh-linked-prs -->\n","author":{"url":"https://github.com/markshannon","@type":"Person","name":"markshannon"},"datePublished":"2024-06-14T14:28:06Z","url":"https://github.com/python/cpython/issues/120507"}

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/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:ab7867c5-482c-4b89-1dcc-5fbddd7710bb
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id8DE4:23E48:A4C12B:CE4D01:6B022F50
html-safe-nonce70d225020e5a875982a067baaa78a7766fef4d006d18c988d9e3aae72acd4708
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4REU0OjIzRTQ4OkE0QzEyQjpDRTREMDE6NkIwMjJGNTAiLCJ2aXNpdG9yX2lkIjoiODE1NzI0MTkxMDMxMDg3NDk2MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac26a33d643826c24f1e6623ae66199d4a1232030872ec89fca328472f062c8637
hovercard-subject-tagissue:2353503584
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/120507/issue_layout
twitter:imagehttps://opengraph.githubassets.com/bcf6477c3eda27b5b25f2ae467b849fcc34b479efb2c17d0a293789dc502ffe2/python/cpython/issues/120507
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/bcf6477c3eda27b5b25f2ae467b849fcc34b479efb2c17d0a293789dc502ffe2/python/cpython/issues/120507
og:image:altWith the JIT and better tier 2 optimizations, effective specialization is becoming more important that plain speed in tier 1. BEFORE_WITH and BEFORE_ASYNC_WITH could be specialized, but they are bu...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamemarkshannon
hostnamegithub.com
expected-hostnamegithub.com
None87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456
turbo-cache-controlno-preview
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
disable-turbofalse
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
react-app-nameissues

Links:

Skip to contenthttps://github.com/python/cpython/issues/120507#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F120507
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%2Fissues%2F120507
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/issues/120507
Reloadhttps://github.com/python/cpython/issues/120507
Reloadhttps://github.com/python/cpython/issues/120507
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
https://github.com/python/cpython
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/120507
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/120507
Lower BEFORE_WITH and BEFORE_ASYNC_WITH to attribute lookups and calls.https://github.com/python/cpython/issues/120507#top
https://github.com/markshannon
markshannonhttps://github.com/markshannon
on Jun 14, 2024https://github.com/python/cpython/issues/120507#issue-2353503584
GH-120507: Lower the BEFORE_WITH and BEFORE_ASYNC_WITH instructions. #120640https://github.com/python/cpython/pull/120640
gh-120507: Double WASI memory #120648https://github.com/python/cpython/pull/120648
https://github.com/markshannon
markshannonhttps://github.com/markshannon
on Jun 17, 2024https://github.com/python/cpython/issues/120507#issuecomment-2173187016
https://github.com/faster-cpython/benchmarking-public/tree/main/results/bm-20240617-3.14.0a0-68df0a5https://github.com/faster-cpython/benchmarking-public/tree/main/results/bm-20240617-3.14.0a0-68df0a5
vstinnerhttps://github.com/vstinner
on Jun 17, 2024https://github.com/python/cpython/issues/120507#event-13187577667
pythongh-120507: Double WASI memoryhttps://github.com/vstinner/cpython/commit/24bb60d24b45d1817d25c770633070973240c4e0
pythongh-120507https://github.com/python/cpython/issues/120507
24bb60dhttps://github.com/vstinner/cpython/commit/24bb60d24b45d1817d25c770633070973240c4e0
gh-120507: Double WASI memory (#120648)https://github.com/python/cpython/commit/6acf7776ef8e0f08e1d4b4b5511bea8d716f571f
gh-120507https://github.com/python/cpython/issues/120507
#120648https://github.com/python/cpython/pull/120648
6acf777https://github.com/python/cpython/commit/6acf7776ef8e0f08e1d4b4b5511bea8d716f571f
markshannonhttps://github.com/markshannon
on Jun 18, 2024https://github.com/python/cpython/issues/120507#event-13199525645
GH-120507: Lower the `BEFORE_WITH` and `BEFORE_ASYNC_WITH` instructio…https://github.com/python/cpython/commit/9cefcc0ee781a1bef9e0685c2271237005fb488b
GH-120507https://github.com/python/cpython/issues/120507
9cefcc0https://github.com/python/cpython/commit/9cefcc0ee781a1bef9e0685c2271237005fb488b
brandtbucherhttps://github.com/brandtbucher
completedhttps://github.com/python/cpython/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Jun 18, 2024https://github.com/python/cpython/issues/120507#event-13207518252
picnixzhttps://github.com/picnixz
on Jun 19, 2024https://github.com/python/cpython/issues/120507#event-13213374942
pythonGH-120507: Lower the `BEFORE_WITH` and `BEFORE_ASYNC_WITH` inst…https://github.com/picnixz/cpython/commit/d3107d467d53919c63de8c13f00c46c4bdc11baa
pythonGH-120507https://github.com/python/cpython/issues/120507
d3107d4https://github.com/picnixz/cpython/commit/d3107d467d53919c63de8c13f00c46c4bdc11baa
mrahtzhttps://github.com/mrahtz
on Jun 30, 2024https://github.com/python/cpython/issues/120507#event-13341935611
pythongh-120507: Double WASI memory (python#120648)https://github.com/mrahtz/cpython/commit/c565073700c7391a126ef6cfd3c8c755bdf05300
pythongh-120507https://github.com/python/cpython/issues/120507
python#120648https://github.com/python/cpython/pull/120648
c565073https://github.com/mrahtz/cpython/commit/c565073700c7391a126ef6cfd3c8c755bdf05300
pythonGH-120507: Lower the `BEFORE_WITH` and `BEFORE_ASYNC_WITH` inst…https://github.com/mrahtz/cpython/commit/81ea6ea11ad15c37657a19ec47afbd4125bde52b
pythonGH-120507https://github.com/python/cpython/issues/120507
81ea6eahttps://github.com/mrahtz/cpython/commit/81ea6ea11ad15c37657a19ec47afbd4125bde52b
estyxxhttps://github.com/estyxx
on Jul 17, 2024https://github.com/python/cpython/issues/120507#event-13533262379
pythongh-120507: Double WASI memory (python#120648)https://github.com/estyxx/cpython/commit/7b46d07278072dda8625a3049b31cba41d463058
pythongh-120507https://github.com/python/cpython/issues/120507
python#120648https://github.com/python/cpython/pull/120648
7b46d07https://github.com/estyxx/cpython/commit/7b46d07278072dda8625a3049b31cba41d463058
pythonGH-120507: Lower the `BEFORE_WITH` and `BEFORE_ASYNC_WITH` inst…https://github.com/estyxx/cpython/commit/d831a39157ab4b83d58fc143c51d3f10a7f6d323
pythonGH-120507https://github.com/python/cpython/issues/120507
d831a39https://github.com/estyxx/cpython/commit/d831a39157ab4b83d58fc143c51d3f10a7f6d323
Sign up for freehttps://github.com/signup?return_to=https://github.com/python/cpython/issues/120507
Sign in to commenthttps://github.com/login?return_to=https://github.com/python/cpython/issues/120507
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.