Title: `PyCode_GetCode` could be faster · Issue #93382 · python/cpython · GitHub
Open Graph Title: `PyCode_GetCode` could be faster · Issue #93382 · python/cpython
X Title: `PyCode_GetCode` could be faster · Issue #93382 · python/cpython
Description: This potentially affects tools like coverage.py. It also means anything using co_code in CPython frequently is significantly slower. Note that pre-3.11, most code would assume this operation is O(1), so it's probably called more often th...
Open Graph Description: This potentially affects tools like coverage.py. It also means anything using co_code in CPython frequently is significantly slower. Note that pre-3.11, most code would assume this operation is O(1...
X Description: This potentially affects tools like coverage.py. It also means anything using co_code in CPython frequently is significantly slower. Note that pre-3.11, most code would assume this operation is O(1...
Opengraph URL: https://github.com/python/cpython/issues/93382
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`PyCode_GetCode` could be faster","articleBody":"This potentially affects tools like coverage.py. It also means anything using `co_code` in CPython frequently is significantly slower. Note that pre-3.11, most code would assume this operation is O(1), so it's probably called more often than we expect.\r\n\r\nWe should lazily initialise a hidden `_co_code` field and cache it there. Currently it creates a fresh bytes object on each `co_code` access. This is at best O(n).","author":{"url":"https://github.com/Fidget-Spinner","@type":"Person","name":"Fidget-Spinner"},"datePublished":"2022-05-31T16:19:47.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/93382/cpython/issues/93382"}
| 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:7fbd3355-e2ca-8b3a-d72d-e55fae09de20 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A7B0:511EE:94AF84:C7C78A:69697DD8 |
| html-safe-nonce | aa40dcf92f7d75f19d77298dd0ab004849a641ae9d3917040b87090dcadb4765 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBN0IwOjUxMUVFOjk0QUY4NDpDN0M3OEE6Njk2OTdERDgiLCJ2aXNpdG9yX2lkIjoiNjc3MTI4MzA5NTE3MzI5OTY3MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 994cc52fbd6b9dcddb4baf48662208667da8e1397239820e1ea9f47cb1fff63d |
| hovercard-subject-tag | issue:1254103766 |
| 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/93382/issue_layout |
| twitter:image | https://opengraph.githubassets.com/dbee677b32623d1939d1543e911b00c1962227f8898689f38b87c20dd0a3da79/python/cpython/issues/93382 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/dbee677b32623d1939d1543e911b00c1962227f8898689f38b87c20dd0a3da79/python/cpython/issues/93382 |
| og:image:alt | This potentially affects tools like coverage.py. It also means anything using co_code in CPython frequently is significantly slower. Note that pre-3.11, most code would assume this operation is O(1... |
| 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 | f33e4b94c8824ab2b434d82a94139432fb5ebee9df4b75304140ad22508c4a77 |
| 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 | 48f380098b30acbb700b04f1724481ca10d574fc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width