René's URL Explorer Experiment


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: The Python programming language. Contribute to python/cpython development by creating an account on GitHub.

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

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/commits(.:format)
route-controllerpull_requests
route-actioncommits
fetch-noncev2:a442003b-7ade-b9dd-29a1-ce3e377f0967
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idA354:1F16D5:461310:5DC128:6969C445
html-safe-nonce5599ca04635aa21c711271dc14744b8597fc8efd792f167e1a2f1a9dc5b5ce96
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMzU0OjFGMTZENTo0NjEzMTA6NURDMTI4OjY5NjlDNDQ1IiwidmlzaXRvcl9pZCI6IjI2OTI5NDgyNDE1NzIwMjEzMTciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacd331b24c826586382f0402a49fee8371a8581635ba8ee1e580bc3558b2d7ca70
hovercard-subject-tagpull_request:1955880199
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/commits
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/python/cpython/pull/121424/commits
twitter:imagehttps://opengraph.githubassets.com/976ddb835a7af3c7e7cc9bed21ac8653058f1b9f0eb4922bdb14d6382bc09e4f/python/cpython/pull/121424
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/976ddb835a7af3c7e7cc9bed21ac8653058f1b9f0eb4922bdb14d6382bc09e4f/python/cpython/pull/121424
og:image:althyperfine: $ 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:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameWulian233
hostnamegithub.com
expected-hostnamegithub.com
Noneacedec8b5f975d9e3d494ddd8f949b0b8a0de59d393901e26f73df9dcba80056
turbo-cache-controlno-cache
go-importgithub.com/python/cpython git https://github.com/python/cpython.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id81598961
octolytics-dimension-repository_nwopython/cpython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id81598961
octolytics-dimension-repository_network_root_nwopython/cpython
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release83c08c21cdda978090dc44364b71aa5bc6dcea79
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/121424/commits#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F121424%2Fcommits
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F121424%2Fcommits
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Fcommits&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/pull/121424/commits
Reloadhttps://github.com/python/cpython/pull/121424/commits
Reloadhttps://github.com/python/cpython/pull/121424/commits
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/121424/commits
Notifications https://github.com/login?return_to=%2Fpython%2Fcpython
Fork 33.9k https://github.com/login?return_to=%2Fpython%2Fcpython
Star 71.1k https://github.com/login?return_to=%2Fpython%2Fcpython
Code https://github.com/python/cpython
Issues 5k+ https://github.com/python/cpython/issues
Pull requests 2.1k https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects 31 https://github.com/python/cpython/projects
Security Uh oh! There was an error while loading. Please reload this page. https://github.com/python/cpython/security
Please reload this pagehttps://github.com/python/cpython/pull/121424/commits
Insights https://github.com/python/cpython/pulse
Code https://github.com/python/cpython
Issues https://github.com/python/cpython/issues
Pull requests https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects https://github.com/python/cpython/projects
Security https://github.com/python/cpython/security
Insights https://github.com/python/cpython/pulse
vstinnerhttps://github.com/vstinner
python:mainhttps://github.com/python/cpython/tree/main
Wulian233:sockethttps://github.com/Wulian233/cpython/tree/socket
Conversationhttps://github.com/python/cpython/pull/121424
Commits12 (12)https://github.com/python/cpython/pull/121424/commits
Checkshttps://github.com/python/cpython/pull/121424/checks
Files changedhttps://github.com/python/cpython/pull/121424/files
gh-121423: Improve import time of socket by writing socket.errorTab as a constant and lazy import moduleshttps://github.com/python/cpython/pull/121424/commits#top
vstinnerhttps://github.com/vstinner
python:mainhttps://github.com/python/cpython/tree/main
Wulian233:sockethttps://github.com/Wulian233/cpython/tree/socket
Speed up `socket.errotTab` and lazy import `selectors`https://github.com/python/cpython/pull/121424/commits/1724a3c7d88c71ce7da4dcd28e62530c4c8e4163
https://github.com/Wulian233
Wulian233https://github.com/python/cpython/commits?author=Wulian233
1724a3chttps://github.com/python/cpython/pull/121424/commits/1724a3c7d88c71ce7da4dcd28e62530c4c8e4163
https://github.com/python/cpython/tree/1724a3c7d88c71ce7da4dcd28e62530c4c8e4163
linthttps://github.com/python/cpython/pull/121424/commits/6559ebb00abc6ac7d5afcbb2c92ae8f1f567b241
https://github.com/Wulian233
Wulian233https://github.com/python/cpython/commits?author=Wulian233
6559ebbhttps://github.com/python/cpython/pull/121424/commits/6559ebb00abc6ac7d5afcbb2c92ae8f1f567b241
https://github.com/python/cpython/tree/6559ebb00abc6ac7d5afcbb2c92ae8f1f567b241
typohttps://github.com/python/cpython/pull/121424/commits/984a3b217ccc3f0ff7a34d9bc4e20c400c80f9ab
https://github.com/Wulian233
Wulian233https://github.com/python/cpython/commits?author=Wulian233
984a3b2https://github.com/python/cpython/pull/121424/commits/984a3b217ccc3f0ff7a34d9bc4e20c400c80f9ab
https://github.com/python/cpython/tree/984a3b217ccc3f0ff7a34d9bc4e20c400c80f9ab
lower().startswith("win")https://github.com/python/cpython/pull/121424/commits/1823c9aa8f26dfce45c4c9329d48f90fbd7f7e93
https://github.com/Wulian233
Wulian233https://github.com/python/cpython/commits?author=Wulian233
1823c9ahttps://github.com/python/cpython/pull/121424/commits/1823c9aa8f26dfce45c4c9329d48f90fbd7f7e93
https://github.com/python/cpython/tree/1823c9aa8f26dfce45c4c9329d48f90fbd7f7e93
Update Misc/NEWS.d/next/Library/2024-07-06-12-37-10.gh-issue-121423.vnxrl4.rsthttps://github.com/python/cpython/pull/121424/commits/dce6cd26f334ca6f35764438c2163f38d2bf2ad3
Wulian233https://github.com/python/cpython/commits?author=Wulian233
eendebakpthttps://github.com/python/cpython/commits?author=eendebakpt
dce6cd2https://github.com/python/cpython/pull/121424/commits/dce6cd26f334ca6f35764438c2163f38d2bf2ad3
https://github.com/python/cpython/tree/dce6cd26f334ca6f35764438c2163f38d2bf2ad3
linthttps://github.com/python/cpython/pull/121424/commits/276d0bb5c426313167743902d7bb7720647cc188
https://github.com/Wulian233
Wulian233https://github.com/python/cpython/commits?author=Wulian233
276d0bbhttps://github.com/python/cpython/pull/121424/commits/276d0bb5c426313167743902d7bb7720647cc188
https://github.com/python/cpython/tree/276d0bb5c426313167743902d7bb7720647cc188
Update Misc/NEWS.d/next/Library/2024-07-06-12-37-10.gh-issue-121423.vnxrl4.rsthttps://github.com/python/cpython/pull/121424/commits/feae2fa7dbbe4d88b64396db4f45ddc3d5d7686a
Wulian233https://github.com/python/cpython/commits?author=Wulian233
picnixzhttps://github.com/python/cpython/commits?author=picnixz
feae2fahttps://github.com/python/cpython/pull/121424/commits/feae2fa7dbbe4d88b64396db4f45ddc3d5d7686a
https://github.com/python/cpython/tree/feae2fa7dbbe4d88b64396db4f45ddc3d5d7686a
comment describing the intentional lazy importhttps://github.com/python/cpython/pull/121424/commits/bd771c831e78be812d4dde6ae28270abbd769e09
gpsheadhttps://github.com/python/cpython/commits?author=gpshead
hugovkhttps://github.com/python/cpython/commits?author=hugovk
bd771c8https://github.com/python/cpython/pull/121424/commits/bd771c831e78be812d4dde6ae28270abbd769e09
https://github.com/python/cpython/tree/bd771c831e78be812d4dde6ae28270abbd769e09
Merge branch 'main' into sockethttps://github.com/python/cpython/pull/121424/commits/fa169f89d6a12759815e8d5874d98928e8be940a
https://github.com/hauntsaninja
hauntsaninjahttps://github.com/python/cpython/commits?author=hauntsaninja
fa169f8https://github.com/python/cpython/pull/121424/commits/fa169f89d6a12759815e8d5874d98928e8be940a
https://github.com/python/cpython/tree/fa169f89d6a12759815e8d5874d98928e8be940a
lazy arrayhttps://github.com/python/cpython/pull/121424/commits/1773d04a41d27cf1945f5fc5907f51857a556dd1
https://github.com/Wulian233
Wulian233https://github.com/python/cpython/commits?author=Wulian233
1773d04https://github.com/python/cpython/pull/121424/commits/1773d04a41d27cf1945f5fc5907f51857a556dd1
https://github.com/python/cpython/tree/1773d04a41d27cf1945f5fc5907f51857a556dd1
separate importshttps://github.com/python/cpython/pull/121424/commits/412a3d2a6b276e98b1fd9b7cf2069876126acd2f
https://github.com/Wulian233
Wulian233https://github.com/python/cpython/commits?author=Wulian233
412a3d2https://github.com/python/cpython/pull/121424/commits/412a3d2a6b276e98b1fd9b7cf2069876126acd2f
https://github.com/python/cpython/tree/412a3d2a6b276e98b1fd9b7cf2069876126acd2f
undo 3.14.rsthttps://github.com/python/cpython/pull/121424/commits/fa493950862a325007bbf9e056f8da957b01bd60
https://github.com/Wulian233
Wulian233https://github.com/python/cpython/commits?author=Wulian233
fa49395https://github.com/python/cpython/pull/121424/commits/fa493950862a325007bbf9e056f8da957b01bd60
https://github.com/python/cpython/tree/fa493950862a325007bbf9e056f8da957b01bd60
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.