René's URL Explorer Experiment


Title: GH-123040: Specialize shadowed `LOAD_ATTR`. by markshannon · Pull Request #123219 · python/cpython · GitHub

Open Graph Title: GH-123040: Specialize shadowed `LOAD_ATTR`. by markshannon · Pull Request #123219 · python/cpython

X Title: GH-123040: Specialize shadowed `LOAD_ATTR`. by markshannon · Pull Request #123219 · python/cpython

Description: This PR specializes LOAD_ATTR for shadowed attributes, where the shadowing doesn't change the attribute. Stats show a 30% reduction in specialization failures for LOAD_ATTR. Performance might show a slight speedup, but is more likely just noise. Issue: gh-123040

Open Graph Description: This PR specializes LOAD_ATTR for shadowed attributes, where the shadowing doesn't change the attribute. Stats show a 30% reduction in specialization failures for LOAD_ATTR. Performance might s...

X Description: This PR specializes LOAD_ATTR for shadowed attributes, where the shadowing doesn't change the attribute. Stats show a 30% reduction in specialization failures for LOAD_ATTR. Performance mig...

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

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:402bd796-d8aa-bc29-4fda-66bfb762fc72
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idE0CC:179658:A6D81D:F5CE64:6A4E206E
html-safe-nonce5959f00b8691054fb1949b72f882fee95e7fa6178a07af45e3b781fe21ecf764
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMENDOjE3OTY1ODpBNkQ4MUQ6RjVDRTY0OjZBNEUyMDZFIiwidmlzaXRvcl9pZCI6IjI3NjgxNjY1NzkzNjc0NTI3ODIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac14645b0668872985e718429d1a9139eb75051cc6aea02678f454e6793edff6a2
hovercard-subject-tagpull_request:2031636041
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/123219/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:altThis PR specializes LOAD_ATTR for shadowed attributes, where the shadowing doesn't change the attribute. Stats show a 30% reduction in specialization failures for LOAD_ATTR. Performance might s...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None030096ee0db095447bfe77409d33bfac127ca7128299c58deef27c52eaa1b1f0
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
release5fe497b4815fcce3df76c0e246faa739a82c3124
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/123219/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F123219%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
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
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://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/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F123219%2Ffiles
Sign up https://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/123219/files
Reloadhttps://github.com/python/cpython/pull/123219/files
Reloadhttps://github.com/python/cpython/pull/123219/files
Please reload this pagehttps://github.com/python/cpython/pull/123219/files
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/123219/files
Notifications https://github.com/login?return_to=%2Fpython%2Fcpython
Fork 34.8k https://github.com/login?return_to=%2Fpython%2Fcpython
Star 73.6k https://github.com/login?return_to=%2Fpython%2Fcpython
Code https://github.com/python/cpython
Issues 5k+ https://github.com/python/cpython/issues
Pull requests 2.3k https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects https://github.com/python/cpython/projects
Security and quality 0 https://github.com/python/cpython/security
Insights https://github.com/python/cpython/pulse
Code https://github.com/python/cpython
Issues https://github.com/python/cpython/issues
Pull requests https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects https://github.com/python/cpython/projects
Security and quality https://github.com/python/cpython/security
Insights https://github.com/python/cpython/pulse
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:specialize-shadowed-load-attrhttps://github.com/faster-cpython/cpython/tree/specialize-shadowed-load-attr
Conversation 9 https://github.com/python/cpython/pull/123219
Commits 12 https://github.com/python/cpython/pull/123219/commits
Checks 0 https://github.com/python/cpython/pull/123219/checks
Files changed https://github.com/python/cpython/pull/123219/files
Please reload this pagehttps://github.com/python/cpython/pull/123219/files
GH-123040: Specialize shadowed LOAD_ATTR. https://github.com/python/cpython/pull/123219/files#top
Show all changes 12 commits https://github.com/python/cpython/pull/123219/files
5e4c3d3 Specialize LOAD_ATTR for instance values, even when shadowing class a… markshannon Aug 16, 2024 https://github.com/python/cpython/pull/123219/commits/5e4c3d3a70d94c54f2b5626b35f4d9780aee2a86
a983591 Don't count as shadowed unless optimization fails markshannon Aug 16, 2024 https://github.com/python/cpython/pull/123219/commits/a983591215d42f846521d8ff8c8ad88ecf57b028
c0b4711 Add LOAD_ATTR_CLASS_WITH_METACLASS_CHECK specialization and handle cl… markshannon Aug 16, 2024 https://github.com/python/cpython/pull/123219/commits/c0b471104d40470d4039574abdf30fa4ed565745
5dfc529 Merge branch 'main' into specialize-shadowed-load-attr markshannon Aug 16, 2024 https://github.com/python/cpython/pull/123219/commits/5dfc5299953e85145f5a02379023ef0b55eb7a8c
b0f4953 Merge branch 'specialize-load-attr-class-shadowed' into specialize-sh… markshannon Aug 16, 2024 https://github.com/python/cpython/pull/123219/commits/b0f4953c078c387e30a76993b53f8c6a288b8ad5
6f4843a Differentiate between split keys and non-string keys in stats markshannon Aug 20, 2024 https://github.com/python/cpython/pull/123219/commits/6f4843a44111f3b04f137d7bfc1380837070df54
02137b3 Merge branch 'main' into specialize-shadowed-load-attr markshannon Aug 21, 2024 https://github.com/python/cpython/pull/123219/commits/02137b30a615915ea3664b636d6ce60fbcc27d3b
ba7b63c Reorganize code markshannon Aug 21, 2024 https://github.com/python/cpython/pull/123219/commits/ba7b63c2aec5a721ba9c33cd14862756d4fb12b5
975089f Merge branch 'main' into specialize-shadowed-load-attr markshannon Aug 21, 2024 https://github.com/python/cpython/pull/123219/commits/975089fe78955672bb89cadb20940dfbf56df80a
b7dbcc8 Make function static markshannon Aug 22, 2024 https://github.com/python/cpython/pull/123219/commits/b7dbcc8bc87c775d0fddb8985b2361e013797d9c
4b37d6c Tidy logic in _Py_Specialize_LoadAttr markshannon Aug 22, 2024 https://github.com/python/cpython/pull/123219/commits/4b37d6cf959c2f38e040f2a06ea1cb3b6c0fb7ab
cc92e97 Fix compiler wanring and clarify comment markshannon Aug 22, 2024 https://github.com/python/cpython/pull/123219/commits/cc92e97639d66d7a6c9d66a65d710197c9a457b0
Clear filters https://github.com/python/cpython/pull/123219/files
Please reload this pagehttps://github.com/python/cpython/pull/123219/files
Please reload this pagehttps://github.com/python/cpython/pull/123219/files
pycore_opcode_metadata.h https://github.com/python/cpython/pull/123219/files#diff-72bc4c0445516cc3eabd536220b2459617491ffaabbdb8a7c5381f36c991e378
opcode_ids.h https://github.com/python/cpython/pull/123219/files#diff-e4ecf20b65dcacb3c91fc910b83d99a2ca60282b51aa65e7902a662c227e6187
_opcode_metadata.py https://github.com/python/cpython/pull/123219/files#diff-3f2acff9cdbb005de538e3ba43dc12406bf414047d7d018476bac0048b5056e4
bytecodes.c https://github.com/python/cpython/pull/123219/files#diff-729a985b0cb8b431cb291f1edb561bbbfea22e3f8c262451cd83328a0936a342
generated_cases.c.h https://github.com/python/cpython/pull/123219/files#diff-4ef46fa654f95502e49a24f7dc8ee31a4cac9b3433fe9cd2b2d4dd78cfbad448
opcode_targets.h https://github.com/python/cpython/pull/123219/files#diff-d3363a4083b77b9157d0bf07c2e87f3d3464a8b4360d5d23b07bbb23061f007a
specialize.c https://github.com/python/cpython/pull/123219/files#diff-22e653d878778ca28317261f7826545288d02fd9980cf485d0329f28a34993f2
Include/internal/pycore_opcode_metadata.hhttps://github.com/python/cpython/pull/123219/files#diff-72bc4c0445516cc3eabd536220b2459617491ffaabbdb8a7c5381f36c991e378
View file https://github.com/faster-cpython/cpython/blob/cc92e97639d66d7a6c9d66a65d710197c9a457b0/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/123219/files
Include/opcode_ids.hhttps://github.com/python/cpython/pull/123219/files#diff-e4ecf20b65dcacb3c91fc910b83d99a2ca60282b51aa65e7902a662c227e6187
View file https://github.com/faster-cpython/cpython/blob/cc92e97639d66d7a6c9d66a65d710197c9a457b0/Include/opcode_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/123219/files
Lib/_opcode_metadata.pyhttps://github.com/python/cpython/pull/123219/files#diff-3f2acff9cdbb005de538e3ba43dc12406bf414047d7d018476bac0048b5056e4
View file https://github.com/faster-cpython/cpython/blob/cc92e97639d66d7a6c9d66a65d710197c9a457b0/Lib/_opcode_metadata.py
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/123219/files
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L225
Python/bytecodes.chttps://github.com/python/cpython/pull/123219/files#diff-729a985b0cb8b431cb291f1edb561bbbfea22e3f8c262451cd83328a0936a342
View file https://github.com/faster-cpython/cpython/blob/cc92e97639d66d7a6c9d66a65d710197c9a457b0/Python/bytecodes.c
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/123219/{{ revealButtonHref }}
https://github.com/python/cpython/pull/123219/files#diff-729a985b0cb8b431cb291f1edb561bbbfea22e3f8c262451cd83328a0936a342
https://github.com/python/cpython/pull/123219/files#diff-729a985b0cb8b431cb291f1edb561bbbfea22e3f8c262451cd83328a0936a342
https://github.com/python/cpython/pull/123219/files#diff-729a985b0cb8b431cb291f1edb561bbbfea22e3f8c262451cd83328a0936a342
https://github.com/python/cpython/pull/123219/files#diff-729a985b0cb8b431cb291f1edb561bbbfea22e3f8c262451cd83328a0936a342
https://github.com/python/cpython/pull/123219/files#diff-729a985b0cb8b431cb291f1edb561bbbfea22e3f8c262451cd83328a0936a342
Python/generated_cases.c.hhttps://github.com/python/cpython/pull/123219/files#diff-4ef46fa654f95502e49a24f7dc8ee31a4cac9b3433fe9cd2b2d4dd78cfbad448
View file https://github.com/faster-cpython/cpython/blob/cc92e97639d66d7a6c9d66a65d710197c9a457b0/Python/generated_cases.c.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/123219/files
Python/opcode_targets.hhttps://github.com/python/cpython/pull/123219/files#diff-d3363a4083b77b9157d0bf07c2e87f3d3464a8b4360d5d23b07bbb23061f007a
View file https://github.com/faster-cpython/cpython/blob/cc92e97639d66d7a6c9d66a65d710197c9a457b0/Python/opcode_targets.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/123219/files
Please reload this pagehttps://github.com/python/cpython/pull/123219/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.