Title: GH-100987: Don't cache references to the names and consts array in `_PyEval_EvalFrameDefault`. by markshannon · Pull Request #102640 · python/cpython · GitHub
Open Graph Title: GH-100987: Don't cache references to the names and consts array in `_PyEval_EvalFrameDefault`. by markshannon · Pull Request #102640 · python/cpython
X Title: GH-100987: Don't cache references to the names and consts array in `_PyEval_EvalFrameDefault`. by markshannon · Pull Request #102640 · python/cpython
Description: Currently we cache names and consts in the interpreter. This makes looking up names and consts faster, but slows down calls, returns, yields and sends. Removing these values has two benefits: It allows objects other than code objects to be the "code" in a frame, see #100987 for why this is a good thing. It allows the interpreter to execute a limited set of sequences of bytecodes, without requiring them to belong to a code object which cleans up the code for shims and trampolines (which will need more of in the future). Performance changes show the usual level of noise, with a mean 0.8% speedup. But the speedups are likely due to faster call/return send/yield sequences, and the slowdowns due to slower LOAD_CONST. I'm not too concerned about the later, because the tier 2 interpreter will want to fetch its constants from the superblock, not the code object. Skipping news as this has no observable effect at either Python or C-API level. Issue: gh-100987
Open Graph Description: Currently we cache names and consts in the interpreter. This makes looking up names and consts faster, but slows down calls, returns, yields and sends. Removing these values has two benefits: It a...
X Description: Currently we cache names and consts in the interpreter. This makes looking up names and consts faster, but slows down calls, returns, yields and sends. Removing these values has two benefits: It a...
Opengraph URL: https://github.com/python/cpython/pull/102640
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/checks(.:format) |
| route-controller | pull_requests |
| route-action | checks |
| fetch-nonce | v2:569b5e9a-151f-2d9b-6c37-86ba772825d1 |
| current-catalog-service-hash | 87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a |
| request-id | 9D94:217FCE:8E4EA0:C2CB48:6969DFA3 |
| html-safe-nonce | d091b0771b3c5388842a9ade3a4db45668447988b7f53dd0490948a197544d84 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RDk0OjIxN0ZDRTo4RTRFQTA6QzJDQjQ4OjY5NjlERkEzIiwidmlzaXRvcl9pZCI6IjgwNDI3NDM4MzYxNjU5NzkyMyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 845748ea7e358faa02057b81b4c327d06469f51f6c9ccd08dd0b8bb959814afc |
| hovercard-subject-tag | pull_request:1273126747 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,checks,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/102640/checks |
| twitter:image | https://avatars.githubusercontent.com/u/9448417?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/9448417?s=400&v=4 |
| og:image:alt | Currently we cache names and consts in the interpreter. This makes looking up names and consts faster, but slows down calls, returns, yields and sends. Removing these values has two benefits: It a... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7b32f1c7c4549428ee399213e8345494fc55b5637195d3fc5f493657579235e8 |
| 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 full-width full-width-p-0 |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | bdde15ad1b403e23b08bbd89b53fbe6bdf688cad |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width