René's URL Explorer Experiment


Title: Switching between the JIT and interpreter is too slow. · Issue #136410 · python/cpython · GitHub

Open Graph Title: Switching between the JIT and interpreter is too slow. · Issue #136410 · python/cpython

X Title: Switching between the JIT and interpreter is too slow. · Issue #136410 · python/cpython

Description: A key part of the original design thesis for the JIT was that it was OK to jit small sections of code, provided that the cost of entering and exiting jjitted code was small enough. Ideally, entering (and exiting) jitted code should cost ...

Open Graph Description: A key part of the original design thesis for the JIT was that it was OK to jit small sections of code, provided that the cost of entering and exiting jjitted code was small enough. Ideally, enterin...

X Description: A key part of the original design thesis for the JIT was that it was OK to jit small sections of code, provided that the cost of entering and exiting jjitted code was small enough. Ideally, enterin...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Switching between the JIT and interpreter is too slow.","articleBody":"A key part of the original design thesis for the JIT was that it was OK to jit small sections of code, provided that the cost of entering and exiting jjitted code was small enough.\nIdeally, entering (and exiting) jitted code should cost no more than 2 or 3 instruction dispatches in the interpreter.\n\nAt the moment, we are nowhere near that.\n\nTo achieve that low overhead, we need transfers to perform minimal memory accesses and use reasonably easily predictable branches.\n\n### What we have now \n#### ENTER_EXECUTOR\n\nThis is where code enters the jit. Currently this does an eval-breaker check (to avoid needing to perform an escaping call in the jit) then increfs the executor, to keep it alive, calls the shim frame, which then calls the actual jitted code.\n\n#### _EXIT_TRACE\n\nThis is where jitted code transfers control back to the interpreter or to other jitted code.\nThis uop contains complex logic to determine whether the exit is \"hot\", calls the jit compiler or jumps to other jitted code. Even in the case where jitted code already exists, it still needs to check for validity, before making a doubly dependent load to find the jitted code: `exit-\u003eexecutor-\u003ejitted_code`.\n\n### What we want:\n\nFirst of all, the interpreter and jit need to use the same calling convention. We can do this by using the tailcalling interpreter and TOS caching, such that the jitted code and interpreter functions take the same parameters.\n\nWe also want to refactor the executor or calling conventions, to save an indirection. ie. `exit-\u003ejit` rather than `exit-\u003eexecutor-\u003ejit`.\n\n#### ENTER_EXECUTOR\n\nWith the same calling convention, there should be no need for a shim frame. \nSo, apart from the eval-breaker check, `ENTER_EXECUTOR` only needs to find the executor and make the tailcall `executor-\u003ejit(...)`.\n\n#### _EXIT_TRACE\n\nBy handling cold exits and invalid executors in stubs, `_EXIT_TRACE` can avoid complex control flow and tailcall directly into the exit: `exit-\u003ejit(...)`.\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-136411\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/markshannon","@type":"Person","name":"markshannon"},"datePublished":"2025-07-08T08:57:02.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/136410/cpython/issues/136410"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:22f0f7b3-32d3-f79f-c810-ffc1ae6ad013
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idD30A:279D29:1D675D1:2905948:6A55F08F
html-safe-nonceeac0a0e864c91d6119a0a98088a683e78a88c8f5b56cd8ed4936353757e0fe7c
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMzBBOjI3OUQyOToxRDY3NUQxOjI5MDU5NDg6NkE1NUYwOEYiLCJ2aXNpdG9yX2lkIjoiNTg0Mjk3MTY3MjczOTk2NzEyMCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac217738c51b20674f276591306257407fef77fab120d5ce9aa845a35b6282620e
hovercard-subject-tagissue:3211654220
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/136410/issue_layout
twitter:imagehttps://opengraph.githubassets.com/a3dd765a72dea45b92f8eb995e95d94ef0da627adfe3263b3a88479d1b97bfaf/python/cpython/issues/136410
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/a3dd765a72dea45b92f8eb995e95d94ef0da627adfe3263b3a88479d1b97bfaf/python/cpython/issues/136410
og:image:altA key part of the original design thesis for the JIT was that it was OK to jit small sections of code, provided that the cost of entering and exiting jjitted code was small enough. Ideally, enterin...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamemarkshannon
hostnamegithub.com
expected-hostnamegithub.com
Noneb5665c84831ed9ac4fb79519c16c9c5580ba8092fb8bb6e3e72972ec7197348e
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
release3725c7f9b2a6e3a27ef57c5aed13428c0f65e045
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/issues/136410#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F136410
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%2Fissues%2F136410
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%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/issues/136410
Reloadhttps://github.com/python/cpython/issues/136410
Reloadhttps://github.com/python/cpython/issues/136410
Please reload this pagehttps://github.com/python/cpython/issues/136410
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/issues/136410
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
Switching between the JIT and interpreter is too slow.https://github.com/python/cpython/issues/136410#top
interpreter-core(Objects, Python, Grammar, and Parser dirs)https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22interpreter-core%22
performancePerformance or resource usagehttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22performance%22
topic-JIThttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22topic-JIT%22
type-featureA feature request or enhancementhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-feature%22
https://github.com/markshannon
markshannonhttps://github.com/markshannon
on Jul 8, 2025https://github.com/python/cpython/issues/136410#issue-3211654220
GH-136410: Faster side exits #136411https://github.com/python/cpython/pull/136411
interpreter-core(Objects, Python, Grammar, and Parser dirs)https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22interpreter-core%22
performancePerformance or resource usagehttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22performance%22
topic-JIThttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22topic-JIT%22
type-featureA feature request or enhancementhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-feature%22
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.