Title: Move stackref buffer to per-eval loop to reduce interp stack usage · Issue #138115 · python/cpython · GitHub
Open Graph Title: Move stackref buffer to per-eval loop to reduce interp stack usage · Issue #138115 · python/cpython
X Title: Move stackref buffer to per-eval loop to reduce interp stack usage · Issue #138115 · python/cpython
Description: Feature or enhancement Proposal: The interpreter main loop's stack usage is huge. We should try to reduce it a little. Currently, the stackref buffer takes up 10 words on 64-bit machines. We could lessen that by moving it to the heap (th...
Open Graph Description: Feature or enhancement Proposal: The interpreter main loop's stack usage is huge. We should try to reduce it a little. Currently, the stackref buffer takes up 10 words on 64-bit machines. We could ...
X Description: Feature or enhancement Proposal: The interpreter main loop's stack usage is huge. We should try to reduce it a little. Currently, the stackref buffer takes up 10 words on 64-bit machines. We co...
Opengraph URL: https://github.com/python/cpython/issues/138115
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Move stackref buffer to per-eval loop to reduce interp stack usage","articleBody":"# Feature or enhancement\n\n### Proposal:\n\nThe interpreter main loop's stack usage is huge. We should try to reduce it a little. Currently, the stackref buffer takes up 10 words on 64-bit machines. We could lessen that by moving it to the heap (thread state).\n\nThis might mean slightly less perf due to worse locality and one memory indirection. So let's benchmark this to be sure.\n\n### Has this already been discussed elsewhere?\n\nNo response given\n\n### Links to previous discussion of this feature:\n\n_No response_\n\n\u003c!-- gh-linked-prs -->\n### Linked PRs\n* gh-138116\n\u003c!-- /gh-linked-prs -->\n","author":{"url":"https://github.com/Fidget-Spinner","@type":"Person","name":"Fidget-Spinner"},"datePublished":"2025-08-24T12:48:07Z","url":"https://github.com/python/cpython/issues/138115"}
| react-profiling | 0 |
| react-import-map | react,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-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:af843ea1-9381-24ae-6ac8-ba914c2b312a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C10E:2C69FC:1FE189E:2A2B534:6B023F2E |
| html-safe-nonce | d263205b95ec59d4844a4df14c8579ce1a5053f295c1f0f54994baac63e2ccd2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMTBFOjJDNjlGQzoxRkUxODlFOjJBMkI1MzQ6NkIwMjNGMkUiLCJ2aXNpdG9yX2lkIjoiMjgxMTQ3MTM2ODgyNTIyNTAwNiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 13512edbd2650bfa85cd89963bbc9812c0fe233667b09cd45106a87c06e90b1a |
| hovercard-subject-tag | issue:3349493416 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/138115/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e067352ddb1322be7dd4c8e4aac0c83cc7dc6ea9d43b959f5dbfa3d222bcd3a0/python/cpython/issues/138115 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e067352ddb1322be7dd4c8e4aac0c83cc7dc6ea9d43b959f5dbfa3d222bcd3a0/python/cpython/issues/138115 |
| og:image:alt | Feature or enhancement Proposal: The interpreter main loop's stack usage is huge. We should try to reduce it a little. Currently, the stackref buffer takes up 10 words on 64-bit machines. We could ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Fidget-Spinner |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width