Title: bpo-39465: Fix _PyUnicode_FromId() for subinterpreters by vstinner · Pull Request #20058 · python/cpython · GitHub
Open Graph Title: bpo-39465: Fix _PyUnicode_FromId() for subinterpreters by vstinner · Pull Request #20058 · python/cpython
X Title: bpo-39465: Fix _PyUnicode_FromId() for subinterpreters by vstinner · Pull Request #20058 · python/cpython
Description: Make _PyUnicode_FromId() function compatible with subinterpreters. Each interpreter now has an array of identifier objects (interned strings decoded from UTF-8). Add PyInterpreterState.unicode.identifiers: array of identifiers objects. Add _PyRuntimeState.unicode_ids used to allocate unique indexes to _Py_Identifier. Rewrite _Py_Identifier structure. Benchmark _PyUnicode_FromId(&PyId_a) with _Py_IDENTIFIER(a): [ref] 2.42 ns +- 0.00 ns -> [atomic] 3.39 ns +- 0.00 ns: 1.40x slower This change adds 1 ns per _PyUnicode_FromId() call in average. https://bugs.python.org/issue39465
Open Graph Description: Make _PyUnicode_FromId() function compatible with subinterpreters. Each interpreter now has an array of identifier objects (interned strings decoded from UTF-8). Add PyInterpreterState.unicode.ide...
X Description: Make _PyUnicode_FromId() function compatible with subinterpreters. Each interpreter now has an array of identifier objects (interned strings decoded from UTF-8). Add PyInterpreterState.unicode.ide...
Opengraph URL: https://github.com/python/cpython/pull/20058
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:e1f29d02-df77-170d-8f3c-a315dd7ebc36 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | EB6C:2AC946:3D3178:52C281:6969AD76 |
| html-safe-nonce | 035ff48e6ddd4d072bf6f4911fa4893e66c7d0e97303a00e85b5a71cc37c13ef |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQjZDOjJBQzk0NjozRDMxNzg6NTJDMjgxOjY5NjlBRDc2IiwidmlzaXRvcl9pZCI6IjUzMDE2NjY3NDM4NjIyNzU0NDYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 81ee5d8e595c8ced90fdc37e945ccf4cfb6cef3949e9b9da7c9b31922402c13d |
| hovercard-subject-tag | pull_request:416871594 |
| 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/20058/files |
| twitter:image | https://avatars.githubusercontent.com/u/194129?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/194129?s=400&v=4 |
| og:image:alt | Make _PyUnicode_FromId() function compatible with subinterpreters. Each interpreter now has an array of identifier objects (interned strings decoded from UTF-8). Add PyInterpreterState.unicode.ide... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 24c4c97a2d520cb286b35e1a4c22d7a4df3c26a2fa28dd7cdf0e65db327b4de7 |
| 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 | 124667f43168afb6c9c03b7c02eb5b1d2e1be3d9 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width