René's URL Explorer Experiment


Title: bpo-44337: Improve LOAD_ATTR specialization by markshannon · Pull Request #26759 · python/cpython · GitHub

Open Graph Title: bpo-44337: Improve LOAD_ATTR specialization by markshannon · Pull Request #26759 · python/cpython

X Title: bpo-44337: Improve LOAD_ATTR specialization by markshannon · Pull Request #26759 · python/cpython

Description: We were being overly conservative by not specializing for instance attributes when the class also has an attribute. It is OK to perform that specialization if the class attribute is not an overriding descriptor (and has an immutable class, so it will remain so). This requires more detailed analysis of the class attribute, so this is factored out in a new function, which we can also use when we specialize STORE_ATTR. This PR also specializes obj.__class__ using LOAD_ATTR_SLOT. https://bugs.python.org/issue44337

Open Graph Description: We were being overly conservative by not specializing for instance attributes when the class also has an attribute. It is OK to perform that specialization if the class attribute is not an overridi...

X Description: We were being overly conservative by not specializing for instance attributes when the class also has an attribute. It is OK to perform that specialization if the class attribute is not an overridi...

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

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:cbc125ff-4abf-64e4-aa26-b653a16d97c9
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id8318:2E6B05:3B79749:520CB1F:6A54C357
html-safe-nonce9d06b74b3efaca342d5faf4ff9ba50f2293fe0d2a0bc33392c8fedfc2f621f1e
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MzE4OjJFNkIwNTozQjc5NzQ5OjUyMENCMUY6NkE1NEMzNTciLCJ2aXNpdG9yX2lkIjoiNDA0NTA5ODU1MTYxMjg1MTAzMSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacd0336eba8aff625ac595bd0ae13086eca09ba2a464d1ceedfade87965d13adfc
hovercard-subject-tagpull_request:671575353
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/26759/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:altWe were being overly conservative by not specializing for instance attributes when the class also has an attribute. It is OK to perform that specialization if the class attribute is not an overridi...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noneb9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb
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
release69f9664dd5e7a82ba8ab1b4cb7f5a2f09333ab38
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/26759/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F26759%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/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/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/enterprise/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%2F26759%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/26759/files
Reloadhttps://github.com/python/cpython/pull/26759/files
Reloadhttps://github.com/python/cpython/pull/26759/files
Please reload this pagehttps://github.com/python/cpython/pull/26759/files
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/26759/files
Notifications https://github.com/login?return_to=%2Fpython%2Fcpython
Fork 35k https://github.com/login?return_to=%2Fpython%2Fcpython
Star 73.8k 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:improve-load-attr-specializationhttps://github.com/faster-cpython/cpython/tree/improve-load-attr-specialization
Conversation 27 https://github.com/python/cpython/pull/26759
Commits 5 https://github.com/python/cpython/pull/26759/commits
Checks 0 https://github.com/python/cpython/pull/26759/checks
Files changed https://github.com/python/cpython/pull/26759/files
Please reload this pagehttps://github.com/python/cpython/pull/26759/files
bpo-44337: Improve LOAD_ATTR specialization https://github.com/python/cpython/pull/26759/files#top
Show all changes 5 commits https://github.com/python/cpython/pull/26759/files
d8e1017 Improve LOAD_ATTR specialization markshannon Jun 16, 2021 https://github.com/python/cpython/pull/26759/commits/d8e101775e3a0b4713d53b9cfa7491450b7766fa
65524d1 Add stat for how many times the unquickened instruction has executed. markshannon Jun 16, 2021 https://github.com/python/cpython/pull/26759/commits/65524d103fc432b0abedcf4d2b45fcd62beb8f2f
d5e7d20 Turn stats off by default markshannon Jun 16, 2021 https://github.com/python/cpython/pull/26759/commits/d5e7d20ed7da5218f37dc780deff16fa10002772
3c0b409 Remove unused struct and enum markshannon Jun 16, 2021 https://github.com/python/cpython/pull/26759/commits/3c0b4094d1078d6272a371be2ba8c268d9c35123
5d9eb10 Don't use reserved identifier. markshannon Jun 21, 2021 https://github.com/python/cpython/pull/26759/commits/5d9eb10bbb1d57c0f764cb82f688e3710f332c47
Clear filters https://github.com/python/cpython/pull/26759/files
Please reload this pagehttps://github.com/python/cpython/pull/26759/files
Please reload this pagehttps://github.com/python/cpython/pull/26759/files
pycore_code.h https://github.com/python/cpython/pull/26759/files#diff-97ea1759f82531a45fa685065ff86bc1077c3ab3d5f65220eea48b7730032bc8
ceval.c https://github.com/python/cpython/pull/26759/files#diff-c22186367cbe20233e843261998dc027ae5f1f8c0d2e778abfa454ae74cc59de
specialize.c https://github.com/python/cpython/pull/26759/files#diff-22e653d878778ca28317261f7826545288d02fd9980cf485d0329f28a34993f2
Include/internal/pycore_code.hhttps://github.com/python/cpython/pull/26759/files#diff-97ea1759f82531a45fa685065ff86bc1077c3ab3d5f65220eea48b7730032bc8
View file https://github.com/faster-cpython/cpython/blob/5d9eb10bbb1d57c0f764cb82f688e3710f332c47/Include/internal/pycore_code.h
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/26759/{{ revealButtonHref }}
https://github.com/python/cpython/pull/26759/files#diff-97ea1759f82531a45fa685065ff86bc1077c3ab3d5f65220eea48b7730032bc8
https://github.com/python/cpython/pull/26759/files#diff-97ea1759f82531a45fa685065ff86bc1077c3ab3d5f65220eea48b7730032bc8
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L226
Python/ceval.chttps://github.com/python/cpython/pull/26759/files#diff-c22186367cbe20233e843261998dc027ae5f1f8c0d2e778abfa454ae74cc59de
View file https://github.com/faster-cpython/cpython/blob/5d9eb10bbb1d57c0f764cb82f688e3710f332c47/Python/ceval.c
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/26759/{{ revealButtonHref }}
https://github.com/python/cpython/pull/26759/files#diff-c22186367cbe20233e843261998dc027ae5f1f8c0d2e778abfa454ae74cc59de
https://github.com/python/cpython/pull/26759/files#diff-c22186367cbe20233e843261998dc027ae5f1f8c0d2e778abfa454ae74cc59de
https://github.com/python/cpython/pull/26759/files#diff-c22186367cbe20233e843261998dc027ae5f1f8c0d2e778abfa454ae74cc59de
https://github.com/python/cpython/pull/26759/files#diff-c22186367cbe20233e843261998dc027ae5f1f8c0d2e778abfa454ae74cc59de
Python/specialize.chttps://github.com/python/cpython/pull/26759/files#diff-22e653d878778ca28317261f7826545288d02fd9980cf485d0329f28a34993f2
View file https://github.com/faster-cpython/cpython/blob/5d9eb10bbb1d57c0f764cb82f688e3710f332c47/Python/specialize.c
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/26759/{{ revealButtonHref }}
https://github.com/python/cpython/pull/26759/files#diff-22e653d878778ca28317261f7826545288d02fd9980cf485d0329f28a34993f2
https://github.com/python/cpython/pull/26759/files#diff-22e653d878778ca28317261f7826545288d02fd9980cf485d0329f28a34993f2
https://github.com/python/cpython/pull/26759/files#diff-22e653d878778ca28317261f7826545288d02fd9980cf485d0329f28a34993f2
https://github.com/python/cpython/pull/26759/files#diff-22e653d878778ca28317261f7826545288d02fd9980cf485d0329f28a34993f2
https://github.com/python/cpython/pull/26759/files#diff-22e653d878778ca28317261f7826545288d02fd9980cf485d0329f28a34993f2
Please reload this pagehttps://github.com/python/cpython/pull/26759/files
Please reload this pagehttps://github.com/python/cpython/pull/26759/files
Please reload this pagehttps://github.com/python/cpython/pull/26759/files
Please reload this pagehttps://github.com/python/cpython/pull/26759/files
Please reload this pagehttps://github.com/python/cpython/pull/26759/files
https://github.com/python/cpython/pull/26759/files#diff-22e653d878778ca28317261f7826545288d02fd9980cf485d0329f28a34993f2
Please reload this pagehttps://github.com/python/cpython/pull/26759/files
Please reload this pagehttps://github.com/python/cpython/pull/26759/files
Please reload this pagehttps://github.com/python/cpython/pull/26759/files
Please reload this pagehttps://github.com/python/cpython/pull/26759/files
Please reload this pagehttps://github.com/python/cpython/pull/26759/files
https://github.com/python/cpython/pull/26759/files#diff-22e653d878778ca28317261f7826545288d02fd9980cf485d0329f28a34993f2
https://github.com/python/cpython/pull/26759/files#diff-22e653d878778ca28317261f7826545288d02fd9980cf485d0329f28a34993f2
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.