René's URL Explorer Experiment


Title: bpo-28638: Optimize namedtuple() creation time by minimizing use of exec() by rhettinger · Pull Request #3454 · python/cpython · GitHub

Open Graph Title: bpo-28638: Optimize namedtuple() creation time by minimizing use of exec() by rhettinger · Pull Request #3454 · python/cpython

X Title: bpo-28638: Optimize namedtuple() creation time by minimizing use of exec() by rhettinger · Pull Request #3454 · python/cpython

Description: The Python programming language. Contribute to python/cpython development by creating an account on GitHub.

Open Graph Description: Current version passes tests but doesn't not support the _source attribute or the verbose option. Obtains a 5x creation time speed-up and with small positive impacts on post creation performanc...

X Description: Current version passes tests but doesn't not support the _source attribute or the verbose option. Obtains a 5x creation time speed-up and with small positive impacts on post creation perfor...

Opengraph URL: https://github.com/python/cpython/pull/3454

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/commits(.:format)
route-controllerpull_requests
route-actioncommits
fetch-noncev2:e1c70871-c16c-b36e-5b45-627bb4527f71
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id99BA:3C7A3:4628D8:5EC62B:6A4EB905
html-safe-noncedbc4673bdbf12b93d02e97786e6bf0b48c61c413969c14f91e079c64d44b0e05
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5OUJBOjNDN0EzOjQ2MjhEODo1RUM2MkI6NkE0RUI5MDUiLCJ2aXNpdG9yX2lkIjoiNTQ0MjczNjY4NDE3NjE2MTAyOSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacafdc54fe69520ab210ed8c2c5a11f787d5c247103f4793f6d07acc6480349947
hovercard-subject-tagpull_request:139969979
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/3454/commits
twitter:imagehttps://opengraph.githubassets.com/6c41100a37e5876e2bfbd844d7657490019d031dd7f901db6b1d618393539ae1/python/cpython/pull/3454
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/6c41100a37e5876e2bfbd844d7657490019d031dd7f901db6b1d618393539ae1/python/cpython/pull/3454
og:image:altCurrent version passes tests but doesn't not support the _source attribute or the verbose option. Obtains a 5x creation time speed-up and with small positive impacts on post creation performanc...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamerhettinger
hostnamegithub.com
expected-hostnamegithub.com
None41b6ab3ba6d20a71766ac245b5a4a94c6fc672a9cd4da7d44c1b33ab8bf6a21c
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
releasee6a744804e8e70f97b4d5a18a94dcc63db22f97a
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/3454/commits#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F3454%2Fcommits
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
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
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
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/enterprise/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%2F3454%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/3454/commits
Reloadhttps://github.com/python/cpython/pull/3454/commits
Reloadhttps://github.com/python/cpython/pull/3454/commits
Please reload this pagehttps://github.com/python/cpython/pull/3454/commits
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/3454/commits
Notifications https://github.com/login?return_to=%2Fpython%2Fcpython
Fork 34.8k https://github.com/login?return_to=%2Fpython%2Fcpython
Star 73.6k 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.3k https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects https://github.com/python/cpython/projects
Security and quality 0 https://github.com/python/cpython/security
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 and quality https://github.com/python/cpython/security
Insights https://github.com/python/cpython/pulse
rhettingerhttps://github.com/rhettinger
python:masterhttps://github.com/python/cpython/tree/master
rhettinger:optimize-namedtuplehttps://github.com/rhettinger/cpython/tree/optimize-namedtuple
Conversationhttps://github.com/python/cpython/pull/3454
Commits23 (23)https://github.com/python/cpython/pull/3454/commits
Checkshttps://github.com/python/cpython/pull/3454/checks
Files changedhttps://github.com/python/cpython/pull/3454/files
bpo-28638: Optimize namedtuple() creation time by minimizing use of exec()https://github.com/python/cpython/pull/3454/commits#top
rhettingerhttps://github.com/rhettinger
python:masterhttps://github.com/python/cpython/tree/master
rhettinger:optimize-namedtuplehttps://github.com/rhettinger/cpython/tree/optimize-namedtuple
Working draft without _sourcehttps://github.com/python/cpython/pull/3454/commits/baca675956bab1c58c393a223d55c31ffc56e310
https://github.com/rhettinger
rhettingerhttps://github.com/python/cpython/commits?author=rhettinger
baca675https://github.com/python/cpython/pull/3454/commits/baca675956bab1c58c393a223d55c31ffc56e310
https://github.com/python/cpython/tree/baca675956bab1c58c393a223d55c31ffc56e310
Re-use itemgetter() instanceshttps://github.com/python/cpython/pull/3454/commits/3a2aa415618ef45af68f21afbd1ce56f95693c9c
https://github.com/rhettinger
rhettingerhttps://github.com/python/cpython/commits?author=rhettinger
3a2aa41https://github.com/python/cpython/pull/3454/commits/3a2aa415618ef45af68f21afbd1ce56f95693c9c
https://github.com/python/cpython/tree/3a2aa415618ef45af68f21afbd1ce56f95693c9c
Speed-up calls to __new__() with a pre-bound tuple.__new__()https://github.com/python/cpython/pull/3454/commits/e24ef4beb1cbb90639af13bc09a367bf54c7a48c
https://github.com/rhettinger
rhettingerhttps://github.com/python/cpython/commits?author=rhettinger
e24ef4bhttps://github.com/python/cpython/pull/3454/commits/e24ef4beb1cbb90639af13bc09a367bf54c7a48c
https://github.com/python/cpython/tree/e24ef4beb1cbb90639af13bc09a367bf54c7a48c
Add note regarding string interninghttps://github.com/python/cpython/pull/3454/commits/49aa967264c56110863bf87acb5c2303c4c61c01
https://github.com/rhettinger
rhettingerhttps://github.com/python/cpython/commits?author=rhettinger
49aa967https://github.com/python/cpython/pull/3454/commits/49aa967264c56110863bf87acb5c2303c4c61c01
https://github.com/python/cpython/tree/49aa967264c56110863bf87acb5c2303c4c61c01
Remove unnecessary create function wrappershttps://github.com/python/cpython/pull/3454/commits/c34b44488feb94901b5c224989d72bbddb1d9786
https://github.com/rhettinger
rhettingerhttps://github.com/python/cpython/commits?author=rhettinger
c34b444https://github.com/python/cpython/pull/3454/commits/c34b44488feb94901b5c224989d72bbddb1d9786
https://github.com/python/cpython/tree/c34b44488feb94901b5c224989d72bbddb1d9786
Minor sync-ups with PR-2736. Mostly formatting and f-stringshttps://github.com/python/cpython/pull/3454/commits/0c7f16393c33350809396cc6c3491c1e767f0805
https://github.com/rhettinger
rhettingerhttps://github.com/python/cpython/commits?author=rhettinger
0c7f163https://github.com/python/cpython/pull/3454/commits/0c7f16393c33350809396cc6c3491c1e767f0805
https://github.com/python/cpython/tree/0c7f16393c33350809396cc6c3491c1e767f0805
Bring-in qualname/__module fix-ups from PR-2736https://github.com/python/cpython/pull/3454/commits/5de0b7fd80bf9db74ea136b4d16d1cfb5a2aff28
https://github.com/rhettinger
rhettingerhttps://github.com/python/cpython/commits?author=rhettinger
5de0b7fhttps://github.com/python/cpython/pull/3454/commits/5de0b7fd80bf9db74ea136b4d16d1cfb5a2aff28
https://github.com/python/cpython/tree/5de0b7fd80bf9db74ea136b4d16d1cfb5a2aff28
Formally remove the verbose flag and _source attributehttps://github.com/python/cpython/pull/3454/commits/ca643f4acb542c64cb6aae58ce06b5d4e11f6e7c
https://github.com/rhettinger
rhettingerhttps://github.com/python/cpython/commits?author=rhettinger
ca643f4https://github.com/python/cpython/pull/3454/commits/ca643f4acb542c64cb6aae58ce06b5d4e11f6e7c
https://github.com/python/cpython/tree/ca643f4acb542c64cb6aae58ce06b5d4e11f6e7c
Restore a test of potentially problematic field nameshttps://github.com/python/cpython/pull/3454/commits/e18b92ed04e43b914ddc0f3acf69e5dbef848ef8
https://github.com/rhettinger
rhettingerhttps://github.com/python/cpython/commits?author=rhettinger
e18b92ehttps://github.com/python/cpython/pull/3454/commits/e18b92ed04e43b914ddc0f3acf69e5dbef848ef8
https://github.com/python/cpython/tree/e18b92ed04e43b914ddc0f3acf69e5dbef848ef8
Restore kwonly_args test but without the verbose optionhttps://github.com/python/cpython/pull/3454/commits/0851fc76dbdeef765ca070208f505e29b7b8d1e8
https://github.com/rhettinger
rhettingerhttps://github.com/python/cpython/commits?author=rhettinger
0851fc7https://github.com/python/cpython/pull/3454/commits/0851fc76dbdeef765ca070208f505e29b7b8d1e8
https://github.com/python/cpython/tree/0851fc76dbdeef765ca070208f505e29b7b8d1e8
Adopt Inada's idea to reuse the docstrings for the itemgettershttps://github.com/python/cpython/pull/3454/commits/3ac1151fda5bbfb8da18c7c44b56477fbe71293a
https://github.com/rhettinger
rhettingerhttps://github.com/python/cpython/commits?author=rhettinger
3ac1151https://github.com/python/cpython/pull/3454/commits/3ac1151fda5bbfb8da18c7c44b56477fbe71293a
https://github.com/python/cpython/tree/3ac1151fda5bbfb8da18c7c44b56477fbe71293a
Neaten-up a bithttps://github.com/python/cpython/pull/3454/commits/b31f0639f3f83ca4a7a98715a2693742a97bf8f6
https://github.com/rhettinger
rhettingerhttps://github.com/python/cpython/commits?author=rhettinger
b31f063https://github.com/python/cpython/pull/3454/commits/b31f0639f3f83ca4a7a98715a2693742a97bf8f6
https://github.com/python/cpython/tree/b31f0639f3f83ca4a7a98715a2693742a97bf8f6
Add news blurbhttps://github.com/python/cpython/pull/3454/commits/deb30a2fe688832de98c2ebfd962d060d54d5ef6
https://github.com/rhettinger
rhettingerhttps://github.com/python/cpython/commits?author=rhettinger
deb30a2https://github.com/python/cpython/pull/3454/commits/deb30a2fe688832de98c2ebfd962d060d54d5ef6
https://github.com/python/cpython/tree/deb30a2fe688832de98c2ebfd962d060d54d5ef6
Merge branch 'master' of github.com:python/cpython into optimize-namedtuplehttps://github.com/python/cpython/pull/3454/commits/f402cb3a1a890e0bd5451680a3c78ebff868f448
https://github.com/rhettinger
rhettingerhttps://github.com/python/cpython/commits?author=rhettinger
f402cb3https://github.com/python/cpython/pull/3454/commits/f402cb3a1a890e0bd5451680a3c78ebff868f448
https://github.com/python/cpython/tree/f402cb3a1a890e0bd5451680a3c78ebff868f448
Serhiy pointed-out the need for interninghttps://github.com/python/cpython/pull/3454/commits/86cef9e8ef80217dcb93e2f11821683a91930faa
https://github.com/rhettinger
rhettingerhttps://github.com/python/cpython/commits?author=rhettinger
86cef9ehttps://github.com/python/cpython/pull/3454/commits/86cef9e8ef80217dcb93e2f11821683a91930faa
https://github.com/python/cpython/tree/86cef9e8ef80217dcb93e2f11821683a91930faa
Jelle noticed as missing f on an f-stringhttps://github.com/python/cpython/pull/3454/commits/83b5e93876ea47b81a476c79767306cb474b9152
https://github.com/rhettinger
rhettingerhttps://github.com/python/cpython/commits?author=rhettinger
83b5e93https://github.com/python/cpython/pull/3454/commits/83b5e93876ea47b81a476c79767306cb474b9152
https://github.com/python/cpython/tree/83b5e93876ea47b81a476c79767306cb474b9152
Add whatsnew entry for feature removalhttps://github.com/python/cpython/pull/3454/commits/0168317c6ebf19be74990479003eb8d81faf7694
https://github.com/rhettinger
rhettingerhttps://github.com/python/cpython/commits?author=rhettinger
0168317https://github.com/python/cpython/pull/3454/commits/0168317c6ebf19be74990479003eb8d81faf7694
https://github.com/python/cpython/tree/0168317c6ebf19be74990479003eb8d81faf7694
Accede to request for dict literals instead keyword argumentshttps://github.com/python/cpython/pull/3454/commits/dadafc06fd0ff8fc9f78511d73ca6b1485b17791
https://github.com/rhettinger
rhettingerhttps://github.com/python/cpython/commits?author=rhettinger
dadafc0https://github.com/python/cpython/pull/3454/commits/dadafc06fd0ff8fc9f78511d73ca6b1485b17791
https://github.com/python/cpython/tree/dadafc06fd0ff8fc9f78511d73ca6b1485b17791
Leave the method.__module__ attribute pointing the actual location of the codehttps://github.com/python/cpython/pull/3454/commits/483d08c4e9b949703a3bc2eae73095b4cdc739b1
https://github.com/rhettinger
rhettingerhttps://github.com/python/cpython/commits?author=rhettinger
483d08chttps://github.com/python/cpython/pull/3454/commits/483d08c4e9b949703a3bc2eae73095b4cdc739b1
https://github.com/python/cpython/tree/483d08c4e9b949703a3bc2eae73095b4cdc739b1
Improve variable names and add a micro-optimization for an non-public helper functionhttps://github.com/python/cpython/pull/3454/commits/bc6852c014cda6be19d8f39daca1966a9b9d5536
https://github.com/rhettinger
rhettingerhttps://github.com/python/cpython/commits?author=rhettinger
bc6852chttps://github.com/python/cpython/pull/3454/commits/bc6852c014cda6be19d8f39daca1966a9b9d5536
https://github.com/python/cpython/tree/bc6852c014cda6be19d8f39daca1966a9b9d5536
Simplify by in-lining reuse_itemgetter()https://github.com/python/cpython/pull/3454/commits/c8976744fc3ac2f03c25d942c02271b29cb6352c
https://github.com/rhettinger
rhettingerhttps://github.com/python/cpython/commits?author=rhettinger
c897674https://github.com/python/cpython/pull/3454/commits/c8976744fc3ac2f03c25d942c02271b29cb6352c
https://github.com/python/cpython/tree/c8976744fc3ac2f03c25d942c02271b29cb6352c
Arrange steps in more logical orderhttps://github.com/python/cpython/pull/3454/commits/bd4ea4ece39fd46a953e7c284e4ee6cc4bfc72dd
https://github.com/rhettinger
rhettingerhttps://github.com/python/cpython/commits?author=rhettinger
bd4ea4ehttps://github.com/python/cpython/pull/3454/commits/bd4ea4ece39fd46a953e7c284e4ee6cc4bfc72dd
https://github.com/python/cpython/tree/bd4ea4ece39fd46a953e7c284e4ee6cc4bfc72dd
Save docstring in local cache instead of interninghttps://github.com/python/cpython/pull/3454/commits/ffb78c991e6c2d1719e73ae6b9900fe143f97467
https://github.com/rhettinger
rhettingerhttps://github.com/python/cpython/commits?author=rhettinger
ffb78c9https://github.com/python/cpython/pull/3454/commits/ffb78c991e6c2d1719e73ae6b9900fe143f97467
https://github.com/python/cpython/tree/ffb78c991e6c2d1719e73ae6b9900fe143f97467
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.