René's URL Explorer Experiment


Title: GH-136410: Faster side exits by markshannon · Pull Request #136411 · python/cpython · GitHub

Open Graph Title: GH-136410: Faster side exits by markshannon · Pull Request #136411 · python/cpython

X Title: GH-136410: Faster side exits by markshannon · Pull Request #136411 · python/cpython

Description: This PR reinstates the _COLD_EXIT uop, but this time expects the exit to be passed, not the executor. This way we only need one jitted stub, not hundreds. Using stubs hugely simplifies _EXIT_TRACE as all it needs to do is jump to the exit's executor. The x86-64 stencil for _EXIT_TRACE shrinks from 384 bytes to 36 bytes, although it does require one extra _CHECK_VALIDITY (19 bytes) to be added to each trace. Since traces often contain multiple _EXIT_TRACEs this is a substantial space saving. Issue: gh-136410

Open Graph Description: This PR reinstates the _COLD_EXIT uop, but this time expects the exit to be passed, not the executor. This way we only need one jitted stub, not hundreds. Using stubs hugely simplifies _EXIT_TRACE ...

X Description: This PR reinstates the _COLD_EXIT uop, but this time expects the exit to be passed, not the executor. This way we only need one jitted stub, not hundreds. Using stubs hugely simplifies _EXIT_TRACE ...

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

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:511d154d-a65f-9345-922f-afeb9e1245ca
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id9EFE:3C5EF4:745BC4:A99DF9:6A55F8A7
html-safe-noncef0826480379d8b27101b3fb6a800d996ad67d32912015f04a85cfab8126fe599
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RUZFOjNDNUVGNDo3NDVCQzQ6QTk5REY5OjZBNTVGOEE3IiwidmlzaXRvcl9pZCI6IjYyMzY0MTgxNDMzNjk0MjcxMTEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacc3791df9b7a29540a8010e3982657c59ecb95b32cb1f0d49a6fc362e8035037a
hovercard-subject-tagpull_request:2649248623
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/136411/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 reinstates the _COLD_EXIT uop, but this time expects the exit to be passed, not the executor. This way we only need one jitted stub, not hundreds. Using stubs hugely simplifies _EXIT_TRACE ...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noneb5665c84831ed9ac4fb79519c16c9c5580ba8092fb8bb6e3e72972ec7197348e
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
release3725c7f9b2a6e3a27ef57c5aed13428c0f65e045
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/136411/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F136411%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%2F136411%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/136411/files
Reloadhttps://github.com/python/cpython/pull/136411/files
Reloadhttps://github.com/python/cpython/pull/136411/files
Please reload this pagehttps://github.com/python/cpython/pull/136411/files
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/136411/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:fast-side-exitshttps://github.com/faster-cpython/cpython/tree/fast-side-exits
Conversation 36 https://github.com/python/cpython/pull/136411
Commits 15 https://github.com/python/cpython/pull/136411/commits
Checks 71 https://github.com/python/cpython/pull/136411/checks
Files changed https://github.com/python/cpython/pull/136411/files
Please reload this pagehttps://github.com/python/cpython/pull/136411/files
GH-136410: Faster side exits https://github.com/python/cpython/pull/136411/files#top
Show all changes 15 commits https://github.com/python/cpython/pull/136411/files
a281775 Faster side exits. markshannon Jul 7, 2025 https://github.com/python/cpython/pull/136411/commits/a2817753a9d4a5bfc8873d60a72309efa731cb4a
ec7f0e2 Fix copy-and-paste error markshannon Jul 7, 2025 https://github.com/python/cpython/pull/136411/commits/ec7f0e27b9f563d6c71c73932d686986492dfb17
911520a Check validity at start of trace markshannon Jul 7, 2025 https://github.com/python/cpython/pull/136411/commits/911520a2135b08903fac1ec1ae897aa925eacf43
73832b2 Tidy up markshannon Jul 8, 2025 https://github.com/python/cpython/pull/136411/commits/73832b244e3f634a4a2589908d53d50305fcb1fc
a9297a0 Null test before use markshannon Jul 8, 2025 https://github.com/python/cpython/pull/136411/commits/a9297a0ea0482c1fd27c1de377038c2c13740723
47b53d1 Update asserts markshannon Jul 8, 2025 https://github.com/python/cpython/pull/136411/commits/47b53d1063036123f3cf072eaeb3f29c9e1086ca
2564d41 Properly fix assert markshannon Jul 8, 2025 https://github.com/python/cpython/pull/136411/commits/2564d418b5aed4ff2023870a889a3ba9fb28346e
779bd7d Don't make object immortal until it is fully initialized markshannon Jul 8, 2025 https://github.com/python/cpython/pull/136411/commits/779bd7d9048a1f81b61f271bd66ac99ce17b1147
db336ce Merge branch 'main' into fast-side-exits markshannon Jul 21, 2025 https://github.com/python/cpython/pull/136411/commits/db336ce8bf97d6a75652a30c2874d8095349749a
0b05acf Free cold executor when closing of interpreter markshannon Jul 21, 2025 https://github.com/python/cpython/pull/136411/commits/0b05acfd311bda5007c6920c1ad0fbbafc8f1fd8
142bab6 Add NULL check markshannon Jul 21, 2025 https://github.com/python/cpython/pull/136411/commits/142bab65f6167361e98c431728ee4edaaa6bf1aa
af696ea Free cold executor after final GC markshannon Jul 22, 2025 https://github.com/python/cpython/pull/136411/commits/af696ea11f4dee55898806e8d3b13f76596c4ac3
264559a Add empty _PyExecutor_Free for non-jit builds markshannon Jul 22, 2025 https://github.com/python/cpython/pull/136411/commits/264559ab2f35d05965d5ddeb85cea07127d3a7b0
989a882 Clear exit if START_EXECUTOR detects that the executor is invalid markshannon Jul 30, 2025 https://github.com/python/cpython/pull/136411/commits/989a882896e9798e453e2aff0d0464d2bbef2332
656ada0 Add some asserts markshannon Jul 30, 2025 https://github.com/python/cpython/pull/136411/commits/656ada0fe6ade6b6c288f7a3d5262b89dea0f314
Clear filters https://github.com/python/cpython/pull/136411/files
Please reload this pagehttps://github.com/python/cpython/pull/136411/files
Please reload this pagehttps://github.com/python/cpython/pull/136411/files
pystate.h https://github.com/python/cpython/pull/136411/files#diff-fefbbf791abe2a1b6d9cab39778d388ebb9135eeefbd734e463aac75d1979e7f
pycore_interp_structs.h https://github.com/python/cpython/pull/136411/files#diff-6075b6142803c1eccc213aa150704fd639443c65311d5999f69a5ea77cb76756
pycore_optimizer.h https://github.com/python/cpython/pull/136411/files#diff-04d62d99f4a2b418ae2fd0eecece5b153dee4ac843c706a8de03c45a2d65efcc
pycore_uop_ids.h https://github.com/python/cpython/pull/136411/files#diff-2a420e4d0d58009249c0f73f7c822167b053bd51cb213b20179bd2aebfc66ff9
pycore_uop_metadata.h https://github.com/python/cpython/pull/136411/files#diff-55e65a72fa31e9b746e03076d2c74b716c0c1171663f36960b2339fcbfae9bab
bytecodes.c https://github.com/python/cpython/pull/136411/files#diff-729a985b0cb8b431cb291f1edb561bbbfea22e3f8c262451cd83328a0936a342
ceval.c https://github.com/python/cpython/pull/136411/files#diff-c22186367cbe20233e843261998dc027ae5f1f8c0d2e778abfa454ae74cc59de
ceval_macros.h https://github.com/python/cpython/pull/136411/files#diff-45baf725df91ed7826458cda8a17c2b4a2e5296504de1ed6a1c5a9ebe6390a47
executor_cases.c.h https://github.com/python/cpython/pull/136411/files#diff-a1c3430c42a66c16e6d2e154491a6da993b187b27c628545a12a02c7b2a06b81
generated_cases.c.h https://github.com/python/cpython/pull/136411/files#diff-4ef46fa654f95502e49a24f7dc8ee31a4cac9b3433fe9cd2b2d4dd78cfbad448
jit.c https://github.com/python/cpython/pull/136411/files#diff-d62eca10c65b7e30ce4e711d63b1e6c921c8b90bd4fb08c672d0806025e6d5e0
optimizer.c https://github.com/python/cpython/pull/136411/files#diff-de09f74c4306be5ef0284d665091976873569094d645a35b48467ea2a11d67f7
optimizer_cases.c.h https://github.com/python/cpython/pull/136411/files#diff-ed4567b3e67709ec57bf4df91ef058cfcbe00d7da11cd2a75e38241fa1ca99d2
pystate.c https://github.com/python/cpython/pull/136411/files#diff-7ac11e526f79b42d6ea9d3592cb99da46775640c69fa5510f4a6de87cced7141
template.c https://github.com/python/cpython/pull/136411/files#diff-704d7b643d1dba671c333a070f62cb13f78cfadf481801ff59ebd4ba9272f4ba
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L321
Include/cpython/pystate.hhttps://github.com/python/cpython/pull/136411/files#diff-fefbbf791abe2a1b6d9cab39778d388ebb9135eeefbd734e463aac75d1979e7f
View file https://github.com/faster-cpython/cpython/blob/656ada0fe6ade6b6c288f7a3d5262b89dea0f314/Include/cpython/pystate.h
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/136411/{{ revealButtonHref }}
https://github.com/python/cpython/pull/136411/files#diff-fefbbf791abe2a1b6d9cab39778d388ebb9135eeefbd734e463aac75d1979e7f
https://github.com/python/cpython/pull/136411/files#diff-fefbbf791abe2a1b6d9cab39778d388ebb9135eeefbd734e463aac75d1979e7f
Include/internal/pycore_interp_structs.hhttps://github.com/python/cpython/pull/136411/files#diff-6075b6142803c1eccc213aa150704fd639443c65311d5999f69a5ea77cb76756
View file https://github.com/faster-cpython/cpython/blob/656ada0fe6ade6b6c288f7a3d5262b89dea0f314/Include/internal/pycore_interp_structs.h
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/136411/{{ revealButtonHref }}
https://github.com/python/cpython/pull/136411/files#diff-6075b6142803c1eccc213aa150704fd639443c65311d5999f69a5ea77cb76756
https://github.com/python/cpython/pull/136411/files#diff-6075b6142803c1eccc213aa150704fd639443c65311d5999f69a5ea77cb76756
Include/internal/pycore_optimizer.hhttps://github.com/python/cpython/pull/136411/files#diff-04d62d99f4a2b418ae2fd0eecece5b153dee4ac843c706a8de03c45a2d65efcc
View file https://github.com/faster-cpython/cpython/blob/656ada0fe6ade6b6c288f7a3d5262b89dea0f314/Include/internal/pycore_optimizer.h
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/136411/{{ revealButtonHref }}
https://github.com/python/cpython/pull/136411/files#diff-04d62d99f4a2b418ae2fd0eecece5b153dee4ac843c706a8de03c45a2d65efcc
https://github.com/python/cpython/pull/136411/files#diff-04d62d99f4a2b418ae2fd0eecece5b153dee4ac843c706a8de03c45a2d65efcc
https://github.com/python/cpython/pull/136411/files#diff-04d62d99f4a2b418ae2fd0eecece5b153dee4ac843c706a8de03c45a2d65efcc
https://github.com/python/cpython/pull/136411/files#diff-04d62d99f4a2b418ae2fd0eecece5b153dee4ac843c706a8de03c45a2d65efcc
https://github.com/python/cpython/pull/136411/files#diff-04d62d99f4a2b418ae2fd0eecece5b153dee4ac843c706a8de03c45a2d65efcc
Please reload this pagehttps://github.com/python/cpython/pull/136411/files
Please reload this pagehttps://github.com/python/cpython/pull/136411/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.