René's URL Explorer Experiment


Title: Calls across stack chunks perform badly · Issue #142183 · python/cpython · GitHub

Open Graph Title: Calls across stack chunks perform badly · Issue #142183 · python/cpython

X Title: Calls across stack chunks perform badly · Issue #142183 · python/cpython

Description: The Python stack is composed of a series of chunks of memory. These chunks are large, so we cross the boundaries infrequently and assume that it will never be on the fast path. Unfortunately, it is possible to cross the boundary repeated...

Open Graph Description: The Python stack is composed of a series of chunks of memory. These chunks are large, so we cross the boundaries infrequently and assume that it will never be on the fast path. Unfortunately, it is...

X Description: The Python stack is composed of a series of chunks of memory. These chunks are large, so we cross the boundaries infrequently and assume that it will never be on the fast path. Unfortunately, it is...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Calls across stack chunks perform badly","articleBody":"The Python stack is composed of a series of chunks of memory. These chunks are large, so we cross the boundaries infrequently and assume that it will never be on the fast path.\n\nUnfortunately, it is possible to cross the boundary repeatedly if looping deep in the stack.\n\nWe should adjust the stack when crossing the boundary, to avoid doing so repeatedly.\n\nPossible options include:\n1. Move the caller to the new chunk, so repeated calls do not cross the boundary.\n2. Instead of using a chunked stack, double the size of the stack and copy the old stack.\n\nBoth of these assume that we can move the frame. This is only possible if there are no pointers into the frame.\nIf a frames calls a native function taking an array of arguments, then there will be pointers into the frame.\nSo if we do any moving, we need to check for these pointers.\n\nWhile we cannot move the frame, we can copy it, as long as the original remains. This is a bit wasteful, but shouldn't happen too often or waste too much space.\n\n\n\n\u003c!-- gh-linked-prs -->\n### Linked PRs\n* gh-145789\n* gh-145828\n* gh-145829\n* gh-146123\n* gh-148681\n* gh-149097\n\u003c!-- /gh-linked-prs -->\n","author":{"url":"https://github.com/markshannon","@type":"Person","name":"markshannon"},"datePublished":"2025-12-02T11:12:32Z","url":"https://github.com/python/cpython/issues/142183"}

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/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:45b9f3d9-7b80-2469-8c37-6dd43a9146f8
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idE428:23E48:73D8CE:914C91:6B021F10
html-safe-noncea5e6a4635d99d0448b86fa78c576b0283d43bace23b48d237f075f0b6b6e73d0
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNDI4OjIzRTQ4OjczRDhDRTo5MTRDOTE6NkIwMjFGMTAiLCJ2aXNpdG9yX2lkIjoiMjQ4MDM1MTkxNzQwNzA4NDMwNCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmace9ad12d93a4f6b66ed313d5f90332620c424214426b06ee07c1a7b48e06a8d43
hovercard-subject-tagissue:3685335582
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/142183/issue_layout
twitter:imagehttps://opengraph.githubassets.com/1954b55a9dbeaccb8f3fc786f51f6098a64ba4d425c8b64beccec2d13a906022/python/cpython/issues/142183
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/1954b55a9dbeaccb8f3fc786f51f6098a64ba4d425c8b64beccec2d13a906022/python/cpython/issues/142183
og:image:altThe Python stack is composed of a series of chunks of memory. These chunks are large, so we cross the boundaries infrequently and assume that it will never be on the fast path. Unfortunately, it is...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamemarkshannon
hostnamegithub.com
expected-hostnamegithub.com
None87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456
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
release423dbb54c5e7bfecc838eb387c1435eb3d0e760d
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/python/cpython/issues/142183#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F142183
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%2Fissues%2F142183
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%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/issues/142183
Reloadhttps://github.com/python/cpython/issues/142183
Reloadhttps://github.com/python/cpython/issues/142183
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
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/142183
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/142183
Calls across stack chunks perform badlyhttps://github.com/python/cpython/issues/142183#top
3.15bugs and security fixeshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%223.15%22
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
https://github.com/markshannon
markshannonhttps://github.com/markshannon
on Dec 2, 2025https://github.com/python/cpython/issues/142183#issue-3685335582
gh-142183: Cache one datachunk per tstate to prevent alloc/dealloc thrashing #145789https://github.com/python/cpython/pull/145789
[3.14] gh-142183: Cache one datachunk per tstate to prevent alloc/dealloc thrashing (GH-145789) #145828https://github.com/python/cpython/pull/145828
[3.13] gh-142183: Cache one datachunk per tstate to prevent alloc/dealloc thrashing (GH-145789) #145829https://github.com/python/cpython/pull/145829
[3.13] gh-142183: Cache one datachunk per tstate to prevent alloc/dealloc thrashing (GH-145789) #146123https://github.com/python/cpython/pull/146123
gh-142183: Change data stack to use a resizable array #148681https://github.com/python/cpython/pull/148681
gh-142183: Cache multiple data stack chunks #149097https://github.com/python/cpython/pull/149097
Nexthttps://github.com/python/cpython/issues/142183?timeline_page=1
markshannonhttps://github.com/markshannon
performancePerformance or resource usagehttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22performance%22
interpreter-core(Objects, Python, Grammar, and Parser dirs)https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22interpreter-core%22
3.15bugs and security fixeshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%223.15%22
on Dec 2, 2025https://github.com/python/cpython/issues/142183#event-21303090806
https://github.com/colesbury
colesburyhttps://github.com/colesbury
on Dec 3, 2025https://github.com/python/cpython/issues/142183#issuecomment-3606805064
cpython/Python/bytecodes.chttps://github.com/python/cpython/blob/4172644d78d58189e46424af0aea302b1d78e2de/Python/bytecodes.c#L3748-L3757
4172644https://github.com/python/cpython/commit/4172644d78d58189e46424af0aea302b1d78e2de
https://github.com/markshannon
markshannonhttps://github.com/markshannon
on Dec 3, 2025https://github.com/python/cpython/issues/142183#issuecomment-3607841764
brettcannonhttps://github.com/brettcannon
on Dec 5, 2025https://github.com/python/cpython/issues/142183#event-21394686598
https://github.com/Yhg1s
Yhg1shttps://github.com/Yhg1s
on Mar 9, 2026https://github.com/python/cpython/issues/142183#issuecomment-4025687512
https://github.com/Yhg1s
Yhg1shttps://github.com/Yhg1s
on Mar 9, 2026https://github.com/python/cpython/issues/142183#issuecomment-4025896648
https://github.com/markshannon
markshannonhttps://github.com/markshannon
on Mar 10, 2026https://github.com/python/cpython/issues/142183#issuecomment-4030043347
https://github.com/Yhg1s
Yhg1shttps://github.com/Yhg1s
on Mar 10, 2026https://github.com/python/cpython/issues/142183#issuecomment-4035179505
https://github.com/markshannon
markshannonhttps://github.com/markshannon
on Mar 11, 2026https://github.com/python/cpython/issues/142183#issuecomment-4038957661
@Yhg1shttps://github.com/Yhg1s
https://github.com/Yhg1s
Yhg1shttps://github.com/Yhg1s
on Mar 11, 2026https://github.com/python/cpython/issues/142183#issuecomment-4039183162
Yhg1shttps://github.com/Yhg1s
on Mar 11, 2026https://github.com/python/cpython/issues/142183#event-23473250462
gh-142183: Cache one datachunk per tstate to prevent alloc/dealloc th…https://github.com/python/cpython/commit/706fd4ec08acbf1b1def3630017ebe55d224adfa
gh-142183https://github.com/python/cpython/issues/142183
706fd4ehttps://github.com/python/cpython/commit/706fd4ec08acbf1b1def3630017ebe55d224adfa
miss-islingtonhttps://github.com/miss-islington
on Mar 11, 2026https://github.com/python/cpython/issues/142183#event-23473253960
pythongh-142183: Cache one datachunk per tstate to prevent alloc/deal…https://github.com/miss-islington/cpython/commit/a812905eac488aba4a051c32c4124897f073a407
pythongh-142183https://github.com/python/cpython/issues/142183
a812905https://github.com/miss-islington/cpython/commit/a812905eac488aba4a051c32c4124897f073a407
pythongh-142183: Cache one datachunk per tstate to prevent alloc/deal…https://github.com/miss-islington/cpython/commit/cf08dc2dc9725061254e469606b9e6a4f25280d7
pythongh-142183https://github.com/python/cpython/issues/142183
cf08dc2https://github.com/miss-islington/cpython/commit/cf08dc2dc9725061254e469606b9e6a4f25280d7
dpdanihttps://github.com/dpdani
on May 8, 2026https://github.com/python/cpython/issues/142183#event-25314454696
Merge branch 'main' into pythongh-142183-stack-resizable-arrayhttps://github.com/dpdani/cpython/commit/970282d2717087400de0cff8ef7960e5e6206eb1
pythongh-142183https://github.com/python/cpython/issues/142183
970282dhttps://github.com/dpdani/cpython/commit/970282d2717087400de0cff8ef7960e5e6206eb1
Merge branch 'main' into pythongh-142183-stack-resizable-arrayhttps://github.com/dpdani/cpython/commit/847ddad545c6c407e86dea42721cc30b67acde5a
pythongh-142183https://github.com/python/cpython/issues/142183
847ddadhttps://github.com/dpdani/cpython/commit/847ddad545c6c407e86dea42721cc30b67acde5a
dpdanihttps://github.com/dpdani
on Jun 2, 2026https://github.com/python/cpython/issues/142183#event-26228307525
Merge branch 'main' into pythongh-142183-stack-resizable-arrayhttps://github.com/dpdani/cpython/commit/3ff3d94d368798be96e7258db84cf9b9a967bea8
pythongh-142183https://github.com/python/cpython/issues/142183
3ff3d94https://github.com/dpdani/cpython/commit/3ff3d94d368798be96e7258db84cf9b9a967bea8
https://github.com/maurycy
maurycyhttps://github.com/maurycy
on Aug 3, 2026https://github.com/python/cpython/issues/142183#issuecomment-5171758976
@markshannonhttps://github.com/markshannon
@pablogsalhttps://github.com/pablogsal
@dpdanihttps://github.com/dpdani
https://github.com/markshannon
markshannonhttps://github.com/markshannon
on Aug 4, 2026https://github.com/python/cpython/issues/142183#issuecomment-5176836885
https://github.com/maurycy
maurycyhttps://github.com/maurycy
on Aug 4, 2026https://github.com/python/cpython/issues/142183#issuecomment-5177506210
@markshannonhttps://github.com/markshannon
cpython/Python/bytecodes.chttps://github.com/python/cpython/blob/416c3465e247bc5a36f86b832360f65e06a0767a/Python/bytecodes.c#L4600
416c346https://github.com/python/cpython/commit/416c3465e247bc5a36f86b832360f65e06a0767a
wyzhanghttps://github.com/wyzhang
on Oct 4, 2026https://github.com/python/cpython/issues/142183#event-32464965133
[TPU/Compile] Fix warmup slowdown from CPython 3.12 frame-stack churnhttps://github.com/sgl-project/sglang-torchtpu/commit/0548a541985829ccb8fbeb7ccbda92f71a2ae0c7
0548a54https://github.com/sgl-project/sglang-torchtpu/commit/0548a541985829ccb8fbeb7ccbda92f71a2ae0c7
[TPU/Compile] Fix warmup slowdown from CPython 3.12 frame-stack churnhttps://github.com/sgl-project/sglang-torchtpu/commit/8de20b5ccc4e47c395f138d9160733b4ca223cc5
8de20b5https://github.com/sgl-project/sglang-torchtpu/commit/8de20b5ccc4e47c395f138d9160733b4ca223cc5
[TPU/Compile] Fix warmup slowdown from CPython 3.12 frame-stack churn (…https://github.com/sgl-project/sglang-torchtpu/commit/329f1c0fc2cf47a6d660fbdf1904907fdc6a6b18
…https://github.com/sgl-project/sglang-torchtpu/pull/1037
329f1c0https://github.com/sgl-project/sglang-torchtpu/commit/329f1c0fc2cf47a6d660fbdf1904907fdc6a6b18
alexeyshockovhttps://github.com/alexeyshockov
on Nov 8, 2026https://github.com/python/cpython/issues/142183#event-35518003635
build(bench): micro-benchmarks run on the newest Python, in a nox ses…https://github.com/alexeyshockov/funcparserlib/commit/5b34e33f9dcf3b49f1b75ab107490dcbb7d04690
5b34e33https://github.com/alexeyshockov/funcparserlib/commit/5b34e33f9dcf3b49f1b75ab107490dcbb7d04690
dhansen-nvidiahttps://github.com/dhansen-nvidia
on Nov 12, 2026https://github.com/python/cpython/issues/142183#event-35967776376
[None][perf] Run the executor loop under a CPython frame-stack reservehttps://github.com/dhansen-nvidia/TensorRT-LLM/commit/632ad06ea124f0f08e9e2e601c61e043a915aacf
632ad06https://github.com/dhansen-nvidia/TensorRT-LLM/commit/632ad06ea124f0f08e9e2e601c61e043a915aacf
[None][perf] Run the executor loop under a CPython frame-stack reservehttps://github.com/dhansen-nvidia/TensorRT-LLM/commit/c9576df7f2cd9bb93b90699a892ce6aced6237de
c9576dfhttps://github.com/dhansen-nvidia/TensorRT-LLM/commit/c9576df7f2cd9bb93b90699a892ce6aced6237de
[None][perf] Run the executor loop under a CPython frame-stack reservehttps://github.com/dhansen-nvidia/TensorRT-LLM/commit/e3bdad2fa2264edd336995b72d4cf9bf426272b7
e3bdad2https://github.com/dhansen-nvidia/TensorRT-LLM/commit/e3bdad2fa2264edd336995b72d4cf9bf426272b7
[None][perf] Run the executor loop under a CPython frame-stack reservehttps://github.com/dhansen-nvidia/TensorRT-LLM/commit/75314c3ab3dbe3347f94b9fdd6c919d3160b9ba8
75314c3https://github.com/dhansen-nvidia/TensorRT-LLM/commit/75314c3ab3dbe3347f94b9fdd6c919d3160b9ba8
[None][perf] Run the executor loop under a CPython frame-stack reservehttps://github.com/dhansen-nvidia/TensorRT-LLM/commit/7a843f66497d49d2215285c36b912515494db070
7a843f6https://github.com/dhansen-nvidia/TensorRT-LLM/commit/7a843f66497d49d2215285c36b912515494db070
Sign up for freehttps://github.com/signup?return_to=https://github.com/python/cpython/issues/142183
Sign in to commenthttps://github.com/login?return_to=https://github.com/python/cpython/issues/142183
3.15bugs and security fixeshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%223.15%22
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
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.