Title: bpo-42917: Made block stack for frame objects dynamically sizable by tomKPZ · Pull Request #24204 · python/cpython · GitHub
Open Graph Title: bpo-42917: Made block stack for frame objects dynamically sizable by tomKPZ · Pull Request #24204 · python/cpython
X Title: bpo-42917: Made block stack for frame objects dynamically sizable by tomKPZ · Pull Request #24204 · python/cpython
Description: This removes the hardcoded block stack size of 20 since typical functions have far less than 20 nested blocks. When running an empty program, 256 frame objects get created with an old average size of 420.281 bytes. This change reduces the average size to less than half: 197.000 bytes on x86_64. The goal is not necessarily to reduce memory usage, but to make it more likely for stack frames to stay in L1 cache. In addition, the maximum of 20 blocks is removed. This should make it easier to write code generators that produce deeply nested code. https://bugs.python.org/issue42917
Open Graph Description: This removes the hardcoded block stack size of 20 since typical functions have far less than 20 nested blocks. When running an empty program, 256 frame objects get created with an old average size...
X Description: This removes the hardcoded block stack size of 20 since typical functions have far less than 20 nested blocks. When running an empty program, 256 frame objects get created with an old average size...
Opengraph URL: https://github.com/python/cpython/pull/24204
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:71ef457c-1c1e-52bc-9492-30770ec71c4f |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | B054:11169F:25035C1:3076BF3:696B1AB2 |
| html-safe-nonce | 8877dc859a9ed91d473924fc7893f574156620776679752adb92083769d2a893 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMDU0OjExMTY5RjoyNTAzNUMxOjMwNzZCRjM6Njk2QjFBQjIiLCJ2aXNpdG9yX2lkIjoiNDA5Nzg1Nzk4NTY5NjE3NjgxOCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 74645983328a2a7d3407e08e3e778214f12d83921169a09fa22e69e60ce3b95e |
| hovercard-subject-tag | pull_request:553871290 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,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/python/cpython/pull/24204/files |
| twitter:image | https://avatars.githubusercontent.com/u/9124077?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/9124077?s=400&v=4 |
| og:image:alt | This removes the hardcoded block stack size of 20 since typical functions have far less than 20 nested blocks. When running an empty program, 256 frame objects get created with an old average size... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d |
| turbo-cache-control | no-preview |
| diff-view | unified |
| 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 full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 82560a55c6b2054555076f46e683151ee28a19bc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width