René's URL Explorer Experiment


Title: gh-132042: Speed up slot lookup during class creation by eendebakpt · Pull Request #159479 · python/cpython · GitHub

Open Graph Title: gh-132042: Speed up slot lookup during class creation by eendebakpt · Pull Request #159479 · python/cpython

X Title: gh-132042: Speed up slot lookup during class creation by eendebakpt · Pull Request #159479 · python/cpython

Description: The Python programming language. Contribute to python/cpython development by creating an account on GitHub.

Open Graph Description: fixup_slot_dispatchers() resolves the special-method slots of a new class with one dict lookup per slot name and per class in the MRO: about 92 names times the MRO length, ~180 lookups for class A:...

X Description: fixup_slot_dispatchers() resolves the special-method slots of a new class with one dict lookup per slot name and per class in the MRO: about 92 names times the MRO length, ~180 lookups for class A:...

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

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/_view_fragments/voltron/pull_requests/show/:user_id/:repository/:id/pull_request_layout(.:format)
route-controllervoltron_pull_requests_fragments
route-actionpull_request_layout
fetch-noncev2:d069e88b-b4c8-247a-d3ac-a1fbcd1bc8c5
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idA334:B1B84:2F65BF7:3C5146C:6B01FCF9
html-safe-nonce1c65dbd245770b450f881f352f92f360e3e5833364ebac7b78ad8545900818d2
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMzM0OkIxQjg0OjJGNjVCRjc6M0M1MTQ2Qzo2QjAxRkNGOSIsInZpc2l0b3JfaWQiOiI4NDI0MzkzMzA0MjMzMzQ0MjQ5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac7aa376bec8dcfcc864a3f45c5ad4fbcada2ffe91e8789cf391634779efc53627
hovercard-subject-tagpull_request:4876762589
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///voltron/pull_requests_fragments/pull_request_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/voltron/pull_requests/show/python/cpython/159479/pull_request_layout
twitter:imagehttps://opengraph.githubassets.com/f4116f701230151f3dff5221654d51a343a186743ef4e22ea6f33e25a2077afc/python/cpython/pull/159479
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/f4116f701230151f3dff5221654d51a343a186743ef4e22ea6f33e25a2077afc/python/cpython/pull/159479
og:image:altfixup_slot_dispatchers() resolves the special-method slots of a new class with one dict lookup per slot name and per class in the MRO: about 92 names times the MRO length, ~180 lookups for class A:...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameeendebakpt
hostnamegithub.com
expected-hostnamegithub.com
None87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456
turbo-cache-controlno-cache
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-namepull-requests

Links:

Skip to contenthttps://github.com/python/cpython/pull/159479#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F159479
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%2F159479
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%2Fpull_requests_fragments%2Fpull_request_layout&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/pull/159479
Reloadhttps://github.com/python/cpython/pull/159479
Reloadhttps://github.com/python/cpython/pull/159479
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
eendebakpthttps://github.com/eendebakpt
python:mainhttps://github.com/python/cpython/tree/main
eendebakpt:type_new_fast_slot_lookuphttps://github.com/eendebakpt/cpython/tree/type_new_fast_slot_lookup
Conversationhttps://github.com/python/cpython/pull/159479
Commits11 (11)https://github.com/python/cpython/pull/159479/commits
Checkshttps://github.com/python/cpython/pull/159479/checks
Files changedhttps://github.com/python/cpython/pull/159479/files
gh-132042: Speed up slot lookup during class creationhttps://github.com/python/cpython/pull/159479#top
eendebakpthttps://github.com/eendebakpt
python:mainhttps://github.com/python/cpython/tree/main
eendebakpt:type_new_fast_slot_lookuphttps://github.com/eendebakpt/cpython/tree/type_new_fast_slot_lookup
https://github.com/eendebakpt
eendebakpthttps://github.com/eendebakpt
Oct 15, 2026https://github.com/python/cpython/pull/159479#issue-5870268406
Please reload this pagehttps://github.com/python/cpython/pull/159479
#4902https://github.com/python/cpython/pull/4902
gh-76527https://github.com/python/cpython/issues/76527
#132618https://github.com/python/cpython/pull/132618
@sergey-miryanovhttps://github.com/sergey-miryanov
#132156https://github.com/python/cpython/pull/132156
#132618https://github.com/python/cpython/pull/132618
#132618https://github.com/python/cpython/pull/132618
#132618https://github.com/python/cpython/pull/132618
#132618https://github.com/python/cpython/pull/132618
#132618https://github.com/python/cpython/pull/132618
Claude Codehttps://claude.com/claude-code
Optimize class creation #132042https://github.com/python/cpython/issues/132042
Please reload this pagehttps://github.com/python/cpython/pull/159479
https://github.com/eendebakpt
https://github.com/claude
pythongh-132042https://github.com/python/cpython/issues/132042
: Speed up slot lookup during class creationhttps://github.com/python/cpython/pull/159479/commits/12c36e9b8e50e29383b0551f3ea2b94cba66cff2
12c36e9https://github.com/python/cpython/pull/159479/commits/12c36e9b8e50e29383b0551f3ea2b94cba66cff2
https://github.com/eendebakpt
eendebakpthttps://github.com/eendebakpt
markshannonhttps://github.com/markshannon
code ownerhttps://github.com/python/cpython/blob/3646ea571f3d8290806a3029d555b179f8be1539/.github/CODEOWNERS#L213
October 15, 2026 16:48https://github.com/python/cpython/pull/159479#event-33355745983
https://github.com/apps/bedevere-app
bedevere-apphttps://github.com/apps/bedevere-app
type-feature https://github.com/python/cpython/issues?q=state%3Aopen%20label%3Atype-feature
Oct 15, 2026https://github.com/python/cpython/pull/159479#event-33355755118
https://github.com/apps/bedevere-app
bedevere-apphttps://github.com/apps/bedevere-app
Oct 15, 2026 https://github.com/python/cpython/pull/159479#ref-issue-2968337580
Optimize class creation #132042 https://github.com/python/cpython/issues/132042
https://github.com/apps/bedevere-app
bedevere-apphttps://github.com/apps/bedevere-app
awaiting core review https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22awaiting%20core%20review%22
Oct 15, 2026https://github.com/python/cpython/pull/159479#event-33355760267
eendebakpthttps://github.com/eendebakpt
October 15, 2026 18:48https://github.com/python/cpython/pull/159479#commits-pushed-6926f01
https://github.com/eendebakpt
Merge branch 'main' into type_new_fast_slot_lookuphttps://github.com/python/cpython/pull/159479/commits/6926f016118955c67838df8e0ed0dd656316b29f
6926f01https://github.com/python/cpython/pull/159479/commits/6926f016118955c67838df8e0ed0dd656316b29f
https://github.com/eendebakpt
Replace dead defensive checks in collect_slot_descrs() with assertshttps://github.com/python/cpython/pull/159479/commits/d180deda96aa2d6ec92a41e2e1f2ccbd6224a21f
d180dedhttps://github.com/python/cpython/pull/159479/commits/d180deda96aa2d6ec92a41e2e1f2ccbd6224a21f
https://github.com/eendebakpt
Use the slot name table in update_slot()https://github.com/python/cpython/pull/159479/commits/8b518c971ed37acd62cf4de7e08750a271f3b612
8b518c9https://github.com/python/cpython/pull/159479/commits/8b518c971ed37acd62cf4de7e08750a271f3b612
https://github.com/eendebakpt
Share the slot name table probe loophttps://github.com/python/cpython/pull/159479/commits/e9ec8b63827959c55912d12973314bfa53c9a57c
e9ec8b6https://github.com/python/cpython/pull/159479/commits/e9ec8b63827959c55912d12973314bfa53c9a57c
https://github.com/sergey-miryanov
sergey-miryanovhttps://github.com/sergey-miryanov
Oct 17, 2026 https://github.com/python/cpython/pull/159479#pullrequestreview-5560147080
View reviewed changes https://github.com/python/cpython/pull/159479/files/e9ec8b63827959c55912d12973314bfa53c9a57c
sergey-miryanovhttps://github.com/sergey-miryanov
https://github.com/python/cpython/pull/159479#pullrequestreview-5560147080
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/159479
Objects/typeobject.chttps://github.com/python/cpython/pull/159479/files/e9ec8b63827959c55912d12973314bfa53c9a57c#diff-1decebeef15f4e0b0ce106c665751ec55068d4d1d1825847925ad4f528b5b872
Please reload this pagehttps://github.com/python/cpython/pull/159479
Objects/typeobject.chttps://github.com/python/cpython/pull/159479/files/e9ec8b63827959c55912d12973314bfa53c9a57c#diff-1decebeef15f4e0b0ce106c665751ec55068d4d1d1825847925ad4f528b5b872
Please reload this pagehttps://github.com/python/cpython/pull/159479
Objects/typeobject.chttps://github.com/python/cpython/pull/159479/files/e9ec8b63827959c55912d12973314bfa53c9a57c#diff-1decebeef15f4e0b0ce106c665751ec55068d4d1d1825847925ad4f528b5b872
Please reload this pagehttps://github.com/python/cpython/pull/159479
https://github.com/apps/bedevere-app
bedevere-apphttps://github.com/apps/bedevere-app
awaiting merge https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22awaiting%20merge%22
awaiting core review https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22awaiting%20core%20review%22
Oct 17, 2026https://github.com/python/cpython/pull/159479#event-33543130838
eendebakpthttps://github.com/eendebakpt
October 18, 2026 13:49https://github.com/python/cpython/pull/159479#commits-pushed-cd172c9
https://github.com/eendebakpt
review commentshttps://github.com/python/cpython/pull/159479/commits/cd172c992fce754c2f4575681815fb291d3ce323
cd172c9https://github.com/python/cpython/pull/159479/commits/cd172c992fce754c2f4575681815fb291d3ce323
https://github.com/eendebakpt
Merge branch 'main' into type_new_fast_slot_lookuphttps://github.com/python/cpython/pull/159479/commits/5c154f30e470ce8d6f9feb1acef7bedefd0b5321
5c154f3https://github.com/python/cpython/pull/159479/commits/5c154f30e470ce8d6f9feb1acef7bedefd0b5321
https://github.com/ambv
ambvhttps://github.com/ambv
Oct 20, 2026 https://github.com/python/cpython/pull/159479#ref-pullrequest-3000786526
gh-132042: Prebuild mro_dict for find_name_in_mro to speedup class creation #132618 https://github.com/python/cpython/pull/132618
https://github.com/JelleZijlstra
JelleZijlstrahttps://github.com/JelleZijlstra
Oct 31, 2026 https://github.com/python/cpython/pull/159479#pullrequestreview-5724770462
View reviewed changes https://github.com/python/cpython/pull/159479/files/5c154f30e470ce8d6f9feb1acef7bedefd0b5321
Objects/typeobject.chttps://github.com/python/cpython/pull/159479/files/5c154f30e470ce8d6f9feb1acef7bedefd0b5321#diff-1decebeef15f4e0b0ce106c665751ec55068d4d1d1825847925ad4f528b5b872
JelleZijlstrahttps://github.com/JelleZijlstra
Oct 31, 2026https://github.com/python/cpython/pull/159479#discussion_r4433168000
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/159479
eendebakpthttps://github.com/eendebakpt
Oct 31, 2026https://github.com/python/cpython/pull/159479#discussion_r4433221019
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/159479
eendebakpthttps://github.com/eendebakpt
Oct 31, 2026https://github.com/python/cpython/pull/159479#discussion_r4433566455
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
4007869https://github.com/python/cpython/commit/40078695009b4145928d633110356b3f0a9b1c88
@JelleZijlstrahttps://github.com/JelleZijlstra
Please reload this pagehttps://github.com/python/cpython/pull/159479
JelleZijlstrahttps://github.com/JelleZijlstra
Oct 31, 2026https://github.com/python/cpython/pull/159479#discussion_r4433611588
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/159479
https://github.com/eendebakpt
https://github.com/claude
pythongh-132042https://github.com/python/cpython/issues/132042
: Allow dict subclasses as tp_dict in the slot scanhttps://github.com/python/cpython/pull/159479/commits/8d742e00df26c03c1c4a430ecbb4d691932b252a
8d742e0https://github.com/python/cpython/pull/159479/commits/8d742e00df26c03c1c4a430ecbb4d691932b252a
https://github.com/JelleZijlstra
JelleZijlstrahttps://github.com/JelleZijlstra
Oct 31, 2026 https://github.com/python/cpython/pull/159479#pullrequestreview-5725058982
View reviewed changes https://github.com/python/cpython/pull/159479/files/8d742e00df26c03c1c4a430ecbb4d691932b252a
eendebakpthttps://github.com/eendebakpt
October 31, 2026 23:33https://github.com/python/cpython/pull/159479#commits-pushed-4007869
https://github.com/eendebakpt
https://github.com/claude
pythongh-132042https://github.com/python/cpython/issues/132042
: Test subclassing a type whose tp_dict is a dict subc…https://github.com/python/cpython/pull/159479/commits/40078695009b4145928d633110356b3f0a9b1c88
4007869https://github.com/python/cpython/pull/159479/commits/40078695009b4145928d633110356b3f0a9b1c88
https://github.com/eendebakpt
Merge branch 'main' into type_new_fast_slot_lookuphttps://github.com/python/cpython/pull/159479/commits/9b7ff6a9be3991885430c2553bd26ef60b7a4a84
9b7ff6ahttps://github.com/python/cpython/pull/159479/commits/9b7ff6a9be3991885430c2553bd26ef60b7a4a84
https://github.com/eendebakpt
https://github.com/claude
pythongh-132042https://github.com/python/cpython/issues/132042
: Ignore the MyListDictSubclass_Type static type in ch…https://github.com/python/cpython/pull/159479/commits/9669c6f047dd78d7e39e355f5d57df508b5e801f
9669c6fhttps://github.com/python/cpython/pull/159479/commits/9669c6f047dd78d7e39e355f5d57df508b5e801f
https://github.com/eendebakpt
eendebakpthttps://github.com/eendebakpt
ericsnowcurrentlyhttps://github.com/ericsnowcurrently
code ownerhttps://github.com/python/cpython/blob/82d3439f7cc243b5f8a82d3d1c5c03ad03f8ff80/.github/CODEOWNERS#L129
November 1, 2026 18:36https://github.com/python/cpython/pull/159479#event-34847505591
https://github.com/eendebakpt
eendebakpthttps://github.com/eendebakpt
efeeb6chttps://github.com/python/cpython/commit/efeeb6cc1ba61c9cccbf39c0690b98b4135d201b
Nov 1, 2026https://github.com/python/cpython/pull/159479#event-34850175265
Please reload this pagehttps://github.com/python/cpython/pull/159479
https://github.com/apps/bedevere-app
bedevere-apphttps://github.com/apps/bedevere-app
awaiting merge https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22awaiting%20merge%22
Nov 1, 2026https://github.com/python/cpython/pull/159479#event-34850178235
https://github.com/nascheme
naschemehttps://github.com/nascheme
Nov 2, 2026 https://github.com/python/cpython/pull/159479#ref-pullrequest-5950985786
gh-158195: Do not hold the type lock during stop-the-world #159972 https://github.com/python/cpython/pull/159972
https://github.co/hiddenchars
https://github.com/python/cpython/pull/{{ revealButtonHref }}
Sign up for freehttps://github.com/join?source=comment-repo
Sign in to commenthttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F159479
https://github.com/JelleZijlstra
JelleZijlstra https://github.com/JelleZijlstra
https://github.com/python/cpython/pull/159479/files/5c154f30e470ce8d6f9feb1acef7bedefd0b5321
https://github.com/sergey-miryanov
sergey-miryanov https://github.com/sergey-miryanov
https://github.com/python/cpython/pull/159479/files/e9ec8b63827959c55912d12973314bfa53c9a57c
https://github.com/markshannon
markshannon https://github.com/markshannon
https://github.com/ericsnowcurrently
ericsnowcurrently https://github.com/ericsnowcurrently
Please reload this pagehttps://github.com/python/cpython/pull/159479
type-feature https://github.com/python/cpython/issues?q=state%3Aopen%20label%3Atype-feature
Please reload this pagehttps://github.com/python/cpython/pull/159479
https://github.com/eendebakpt
https://github.com/sergey-miryanov
https://github.com/JelleZijlstra
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.