René's URL Explorer Experiment


Title: gh-148871: Add CONSTANT_EMPTY_TUPLE to LOAD_COMMON_CONSTANT by eendebakpt · Pull Request #149688 · python/cpython · GitHub

Open Graph Title: gh-148871: Add CONSTANT_EMPTY_TUPLE to LOAD_COMMON_CONSTANT by eendebakpt · Pull Request #149688 · python/cpython

X Title: gh-148871: Add CONSTANT_EMPTY_TUPLE to LOAD_COMMON_CONSTANT by eendebakpt · Pull Request #149688 · python/cpython

Description: Add () as a new value for LOAD_COMMON_CONSTANT, following the existing pattern used for "" (CONSTANT_EMPTY_STR). The compiler now folds LOAD_CONST () into LOAD_COMMON_CONSTANT 12, dropping the entry from co_consts. () is the most common constant left in co_consts after the existing LOAD_COMMON_CONSTANT rewrites. Frequencies in co_consts (top-level entries, recursing into nested code objects): Constant stdlib (613,524 entries) pyperformance (9,550 entries) Immortal singleton? () 14,270 (2.33%) 112 (1.17%) yes (Py_CONSTANT_EMPTY_TUPLE) b"" 1,012 (0.16%) 4 (0.04%) yes (Py_CONSTANT_EMPTY_BYTES) 1.0 516 (0.08%) 14 (0.15%) no (would need new immortal float) 0.0 457 (0.07%) 13 (0.14%) no (would need new immortal float; care re: -0.0) ... 139 (0.02%) 1 (0.01%) yes (_Py_EllipsisObject) Common sources of (): __slots__ = (), empty default-args tuples passed to MAKE_FUNCTION, __reduce__ returning (), etc. b"" and ... are already immortal singletons, but less frequent. For reviewers: should we add these as well? Issue: gh-148871

Open Graph Description: Add () as a new value for LOAD_COMMON_CONSTANT, following the existing pattern used for "" (CONSTANT_EMPTY_STR). The compiler now folds LOAD_CONST () into LOAD_COMMON_CONSTANT 12, droppin...

X Description: Add () as a new value for LOAD_COMMON_CONSTANT, following the existing pattern used for "" (CONSTANT_EMPTY_STR). The compiler now folds LOAD_CONST () into LOAD_COMMON_CONSTANT 12,...

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

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:cda20245-fef7-68cc-ade1-e305da354931
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idCAB0:3A4875:34AC53F:462761A:6B01FF69
html-safe-nonce1e0a779995ed965e07c7c26f8fc1a1766d234c84c3f7a4883e0c75ef8d9af0df
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQUIwOjNBNDg3NTozNEFDNTNGOjQ2Mjc2MUE6NkIwMUZGNjkiLCJ2aXNpdG9yX2lkIjoiODYwNzIzNzAwMjY5MTIxNTIwOSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac6b78b348d7d537ca1801c966fe475bbe4dc528dc031475843f6931b1dfb69a04
hovercard-subject-tagpull_request:3662645509
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/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/python/cpython/pull/149688/files
twitter:imagehttps://avatars.githubusercontent.com/u/883786?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/883786?s=400&v=4
og:image:altAdd () as a new value for LOAD_COMMON_CONSTANT, following the existing pattern used for "" (CONSTANT_EMPTY_STR). The compiler now folds LOAD_CONST () into LOAD_COMMON_CONSTANT 12, droppin...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456
turbo-cache-controlno-preview
diff-viewunified
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 full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release423dbb54c5e7bfecc838eb387c1435eb3d0e760d
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/149688/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F149688%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
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
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://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
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F149688%2Ffiles
Sign uphttps://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%2Ffiles&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/pull/149688/files
Reloadhttps://github.com/python/cpython/pull/149688/files
Reloadhttps://github.com/python/cpython/pull/149688/files
pythonhttps://github.com/python
cpythonhttps://github.com/python/cpython
Codehttps://github.com/python/cpython
Issues5k+ (5k+)https://github.com/python/cpython/issues
Pull requests2.4k (2.4k)https://github.com/python/cpython/pulls
Actionshttps://github.com/python/cpython/actions
Projectshttps://github.com/python/cpython/projects
Security and qualityhttps://github.com/python/cpython/security
Insightshttps://github.com/python/cpython/insights
Sign up for GitHub https://github.com/signup?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
markshannonhttps://github.com/markshannon
python:mainhttps://github.com/python/cpython/tree/main
eendebakpt:load-common-const-empty-tuplehttps://github.com/eendebakpt/cpython/tree/load-common-const-empty-tuple
Conversation 3 https://github.com/python/cpython/pull/149688
Commits 3 https://github.com/python/cpython/pull/149688/commits
Checks 57 https://github.com/python/cpython/pull/149688/checks
Files changed https://github.com/python/cpython/pull/149688/files
Please reload this pagehttps://github.com/python/cpython/pull/149688/files
gh-148871: Add CONSTANT_EMPTY_TUPLE to LOAD_COMMON_CONSTANT https://github.com/python/cpython/pull/149688/files#top
Show all changes 3 commits https://github.com/python/cpython/pull/149688/files
79cc39d Add CONSTANT_EMPTY_TUPLE to LOAD_COMMON_CONSTANT eendebakpt May 11, 2026 https://github.com/python/cpython/pull/149688/commits/79cc39d0891a22ef420191a9c4035d46a64af9dc
56d633a Add NEWS entry for gh-148871 eendebakpt May 11, 2026 https://github.com/python/cpython/pull/149688/commits/56d633a37e97b937fbd596eaa673788bbf684d6b
369fe77 Merge remote-tracking branch 'origin/main' into load-common-const-emp… eendebakpt May 20, 2026 https://github.com/python/cpython/pull/149688/commits/369fe776ca4bda98542c07647fa0cbe90ad5192e
Clear filters https://github.com/python/cpython/pull/149688/files
Please reload this pagehttps://github.com/python/cpython/pull/149688/files
Please reload this pagehttps://github.com/python/cpython/pull/149688/files
pycore_magic_number.h https://github.com/python/cpython/pull/149688/files#diff-cab675717b887b20316ee0113f1e44bbd5db4e4a6e04ff75eb3996deffeafed4
pycore_opcode_utils.h https://github.com/python/cpython/pull/149688/files#diff-38427bd410ffc8fb7b8a772b4743daa4fe6a229b13264e73e232172b7219c671
dis.py https://github.com/python/cpython/pull/149688/files#diff-96747735ee3c8aed3dd0f4c1b1ab0310eeb344577b14887cc9f6605892df47a8
opcode.py https://github.com/python/cpython/pull/149688/files#diff-7681b13de881a13601ca56b73d052d032be48da4256df4f2f09e0474b0c1cbeb
test_peepholer.py https://github.com/python/cpython/pull/149688/files#diff-bcf92ed219340e9e0c52401909828c2e9a821541660073e24d64dd996beaf842
2026-05-11-18-20-41.gh-issue-148871.AeCbq7.rst https://github.com/python/cpython/pull/149688/files#diff-bb9aac9735ca63808693e841c51cf8251d330c632ecac7a21cf8cdbe1b6e886b
flowgraph.c https://github.com/python/cpython/pull/149688/files#diff-3cbf15668c31488528b7ab0f903c674a0ecf550f4f53c1be6cf8cd965246c2a0
pylifecycle.c https://github.com/python/cpython/pull/149688/files#diff-69223f5bb01f359a23246afbbf75b45c622e719424418d658674fbb6c2b36fad
Include/internal/pycore_magic_number.hhttps://github.com/python/cpython/pull/149688/files#diff-cab675717b887b20316ee0113f1e44bbd5db4e4a6e04ff75eb3996deffeafed4
View file https://github.com/eendebakpt/cpython/blob/369fe776ca4bda98542c07647fa0cbe90ad5192e/Include/internal/pycore_magic_number.h
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/149688/{{ revealButtonHref }}
https://github.com/python/cpython/pull/149688/files#diff-cab675717b887b20316ee0113f1e44bbd5db4e4a6e04ff75eb3996deffeafed4
https://github.com/python/cpython/pull/149688/files#diff-cab675717b887b20316ee0113f1e44bbd5db4e4a6e04ff75eb3996deffeafed4
https://github.com/python/cpython/pull/149688/files#diff-cab675717b887b20316ee0113f1e44bbd5db4e4a6e04ff75eb3996deffeafed4
Include/internal/pycore_opcode_utils.hhttps://github.com/python/cpython/pull/149688/files#diff-38427bd410ffc8fb7b8a772b4743daa4fe6a229b13264e73e232172b7219c671
View file https://github.com/eendebakpt/cpython/blob/369fe776ca4bda98542c07647fa0cbe90ad5192e/Include/internal/pycore_opcode_utils.h
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/149688/{{ revealButtonHref }}
https://github.com/python/cpython/pull/149688/files#diff-38427bd410ffc8fb7b8a772b4743daa4fe6a229b13264e73e232172b7219c671
https://github.com/python/cpython/pull/149688/files#diff-38427bd410ffc8fb7b8a772b4743daa4fe6a229b13264e73e232172b7219c671
Lib/dis.pyhttps://github.com/python/cpython/pull/149688/files#diff-96747735ee3c8aed3dd0f4c1b1ab0310eeb344577b14887cc9f6605892df47a8
View file https://github.com/eendebakpt/cpython/blob/369fe776ca4bda98542c07647fa0cbe90ad5192e/Lib/dis.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/149688/{{ revealButtonHref }}
https://github.com/python/cpython/pull/149688/files#diff-96747735ee3c8aed3dd0f4c1b1ab0310eeb344577b14887cc9f6605892df47a8
https://github.com/python/cpython/pull/149688/files#diff-96747735ee3c8aed3dd0f4c1b1ab0310eeb344577b14887cc9f6605892df47a8
Lib/opcode.pyhttps://github.com/python/cpython/pull/149688/files#diff-7681b13de881a13601ca56b73d052d032be48da4256df4f2f09e0474b0c1cbeb
View file https://github.com/eendebakpt/cpython/blob/369fe776ca4bda98542c07647fa0cbe90ad5192e/Lib/opcode.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/149688/{{ revealButtonHref }}
https://github.com/python/cpython/pull/149688/files#diff-7681b13de881a13601ca56b73d052d032be48da4256df4f2f09e0474b0c1cbeb
https://github.com/python/cpython/pull/149688/files#diff-7681b13de881a13601ca56b73d052d032be48da4256df4f2f09e0474b0c1cbeb
Lib/test/test_peepholer.pyhttps://github.com/python/cpython/pull/149688/files#diff-bcf92ed219340e9e0c52401909828c2e9a821541660073e24d64dd996beaf842
View file https://github.com/eendebakpt/cpython/blob/369fe776ca4bda98542c07647fa0cbe90ad5192e/Lib/test/test_peepholer.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/149688/{{ revealButtonHref }}
https://github.com/python/cpython/pull/149688/files#diff-bcf92ed219340e9e0c52401909828c2e9a821541660073e24d64dd996beaf842
https://github.com/python/cpython/pull/149688/files#diff-bcf92ed219340e9e0c52401909828c2e9a821541660073e24d64dd996beaf842
https://github.com/python/cpython/pull/149688/files#diff-bcf92ed219340e9e0c52401909828c2e9a821541660073e24d64dd996beaf842
https://github.com/python/cpython/pull/149688/files#diff-bcf92ed219340e9e0c52401909828c2e9a821541660073e24d64dd996beaf842
Misc/NEWS.d/next/Core_and_Builtins/2026-05-11-18-20-41.gh-issue-148871.AeCbq7.rsthttps://github.com/python/cpython/pull/149688/files#diff-bb9aac9735ca63808693e841c51cf8251d330c632ecac7a21cf8cdbe1b6e886b
View file https://github.com/eendebakpt/cpython/blob/369fe776ca4bda98542c07647fa0cbe90ad5192e/Misc/NEWS.d/next/Core_and_Builtins/2026-05-11-18-20-41.gh-issue-148871.AeCbq7.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/149688/{{ revealButtonHref }}
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L230
Python/flowgraph.chttps://github.com/python/cpython/pull/149688/files#diff-3cbf15668c31488528b7ab0f903c674a0ecf550f4f53c1be6cf8cd965246c2a0
View file https://github.com/eendebakpt/cpython/blob/369fe776ca4bda98542c07647fa0cbe90ad5192e/Python/flowgraph.c
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/149688/{{ revealButtonHref }}
https://github.com/python/cpython/pull/149688/files#diff-3cbf15668c31488528b7ab0f903c674a0ecf550f4f53c1be6cf8cd965246c2a0
https://github.com/python/cpython/pull/149688/files#diff-3cbf15668c31488528b7ab0f903c674a0ecf550f4f53c1be6cf8cd965246c2a0
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L318
Python/pylifecycle.chttps://github.com/python/cpython/pull/149688/files#diff-69223f5bb01f359a23246afbbf75b45c622e719424418d658674fbb6c2b36fad
View file https://github.com/eendebakpt/cpython/blob/369fe776ca4bda98542c07647fa0cbe90ad5192e/Python/pylifecycle.c
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/149688/{{ revealButtonHref }}
https://github.com/python/cpython/pull/149688/files#diff-69223f5bb01f359a23246afbbf75b45c622e719424418d658674fbb6c2b36fad
https://github.com/python/cpython/pull/149688/files#diff-69223f5bb01f359a23246afbbf75b45c622e719424418d658674fbb6c2b36fad
Please reload this pagehttps://github.com/python/cpython/pull/149688/files
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.