Title: gh-121423: Improve import time of `socket` by writing `socket.errorTab` as a constant and lazy import modules by Wulian233 · Pull Request #121424 · python/cpython · GitHub
Open Graph Title: gh-121423: Improve import time of `socket` by writing `socket.errorTab` as a constant and lazy import modules by Wulian233 · Pull Request #121424 · python/cpython
X Title: gh-121423: Improve import time of `socket` by writing `socket.errorTab` as a constant and lazy import modules by Wulian233 · Pull Request #121424 · python/cpython
Description: hyperfine: $ hyperfine -w 16 './python -c "import socket"' Time (mean ± σ): 14.6 ms ± 0.7 ms [User: 11.9 ms, System: 2.6 ms] Range (min … max): 13.4 ms … 16.5 ms 192 runs $ git switch pr/121424 $ hyperfine -w 16 './python -c "import socket"' Time (mean ± σ): 13.9 ms ± 0.6 ms [User: 11.4 ms, System: 2.4 ms] Range (min … max): 12.6 ms … 15.5 ms 197 runs ≈ 30% faster Issue: gh-121423 Issue: gh-118761
Open Graph Description: hyperfine: $ hyperfine -w 16 './python -c "import socket"' Time (mean ± σ): 14.6 ms ± 0.7 ms [User: 11.9 ms, System: 2.6 ms] Range (min … max): 13.4 ms … 16.5 ms...
X Description: hyperfine: $ hyperfine -w 16 './python -c "import socket"' Time (mean ± σ): 14.6 ms ± 0.7 ms [User: 11.9 ms, System: 2.6 ms] Range (min … max): 13...
Opengraph URL: https://github.com/python/cpython/pull/121424
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/checks(.:format) |
| route-controller | pull_requests |
| route-action | checks |
| fetch-nonce | v2:62631d93-b00e-1d0a-212f-8bfbf7036e4a |
| current-catalog-service-hash | 87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a |
| request-id | CF78:128E19:2B7691:39B434:6969C164 |
| html-safe-nonce | 02dac234861cd20d6968720b2a1290063773761b841326f97c0cf94f41ecabf3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRjc4OjEyOEUxOToyQjc2OTE6MzlCNDM0OjY5NjlDMTY0IiwidmlzaXRvcl9pZCI6IjI2NTA0NjQ0MDUwNTk5MTIwMzYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 81d751abd51def1e8c35b43247eee8f5dcb5f79ee855c79e38197ccc7e1b886e |
| hovercard-subject-tag | pull_request:1955880199 |
| 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/121424/checks |
| twitter:image | https://avatars.githubusercontent.com/u/71213467?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/71213467?s=400&v=4 |
| og:image:alt | hyperfine: $ hyperfine -w 16 './python -c "import socket"' Time (mean ± σ): 14.6 ms ± 0.7 ms [User: 11.9 ms, System: 2.6 ms] Range (min … max): 13.4 ms … 16.5 ms... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | acedec8b5f975d9e3d494ddd8f949b0b8a0de59d393901e26f73df9dcba80056 |
| 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 | 83c08c21cdda978090dc44364b71aa5bc6dcea79 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width