René's URL Explorer Experiment


Title: bpo-44946: Streamline operators and creation of ints for common case of single 'digit'. by markshannon · Pull Request #27832 · python/cpython · GitHub

Open Graph Title: bpo-44946: Streamline operators and creation of ints for common case of single 'digit'. by markshannon · Pull Request #27832 · python/cpython

X Title: bpo-44946: Streamline operators and creation of ints for common case of single 'digit'. by markshannon · Pull Request #27832 · python/cpython

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

Open Graph Description: Modest speedup of 1% The speedup is unexciting, although every little helps. However, this will help with specialization of integer operations, as that will remove additional overhead. The obvious ...

X Description: Modest speedup of 1% The speedup is unexciting, although every little helps. However, this will help with specialization of integer operations, as that will remove additional overhead. The obvious ...

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

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/commits(.:format)
route-controllerpull_requests
route-actioncommits
fetch-noncev2:3a8337bb-690e-0060-1b07-af96e2ceddad
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idC9C6:1FFDC1:1355DD:1B37B1:696A03B5
html-safe-nonce37c322a60bb84dc07ba9939e972d6c8848acd77716dfa4cce1f698406a10dc9e
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDOUM2OjFGRkRDMToxMzU1REQ6MUIzN0IxOjY5NkEwM0I1IiwidmlzaXRvcl9pZCI6IjQxNjg1Mjc5MjczNDAzMDMyODUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacf5c1bfdefeb27f70d57b8936692b3468e6b08698c6bad89d2247c95cf7d211fb
hovercard-subject-tagpull_request:715885656
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/27832/commits
twitter:imagehttps://opengraph.githubassets.com/f06e345b049f6b6594cffeea28843e85351ba09decb3ef80e6711525459f34d8/python/cpython/pull/27832
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/f06e345b049f6b6594cffeea28843e85351ba09decb3ef80e6711525459f34d8/python/cpython/pull/27832
og:image:altModest speedup of 1% The speedup is unexciting, although every little helps. However, this will help with specialization of integer operations, as that will remove additional overhead. The obvious ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamemarkshannon
hostnamegithub.com
expected-hostnamegithub.com
None578c119ff0247c8b2f2491fbf4fc0395cdf909d4df66598cebdc96ddfc4418dc
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
release671c2f67171dbced24284331f3133a613d08c366
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/27832/commits#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F27832%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%2F27832%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/27832/commits
Reloadhttps://github.com/python/cpython/pull/27832/commits
Reloadhttps://github.com/python/cpython/pull/27832/commits
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/27832/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/27832/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
markshannonhttps://github.com/markshannon
python:mainhttps://github.com/python/cpython/tree/main
faster-cpython:streamline-medium-intshttps://github.com/faster-cpython/cpython/tree/streamline-medium-ints
Conversationhttps://github.com/python/cpython/pull/27832
Commits17 (17)https://github.com/python/cpython/pull/27832/commits
Checkshttps://github.com/python/cpython/pull/27832/checks
Files changedhttps://github.com/python/cpython/pull/27832/files
bpo-44946: Streamline operators and creation of ints for common case of single 'digit'.https://github.com/python/cpython/pull/27832/commits#top
markshannonhttps://github.com/markshannon
python:mainhttps://github.com/python/cpython/tree/main
faster-cpython:streamline-medium-intshttps://github.com/faster-cpython/cpython/tree/streamline-medium-ints
Streamline binary operations and creating new int objects for common case of single 'digit'.https://github.com/python/cpython/pull/27832/commits/da57f0b369f62a07715c5f7e00684768794a273b
https://github.com/markshannon
markshannonhttps://github.com/python/cpython/commits?author=markshannon
da57f0bhttps://github.com/python/cpython/pull/27832/commits/da57f0b369f62a07715c5f7e00684768794a273b
https://github.com/python/cpython/tree/da57f0b369f62a07715c5f7e00684768794a273b
Make sure that all ints, even internal, temporary ones, have at least one digit.https://github.com/python/cpython/pull/27832/commits/0533a9f891f0c54616eef369239cd6554972816f
https://github.com/markshannon
markshannonhttps://github.com/python/cpython/commits?author=markshannon
0533a9fhttps://github.com/python/cpython/pull/27832/commits/0533a9f891f0c54616eef369239cd6554972816f
https://github.com/python/cpython/tree/0533a9f891f0c54616eef369239cd6554972816f
Readability improvements as suggested by Victor Stinner.https://github.com/python/cpython/pull/27832/commits/9349daa9b9d763a2d3114f7d4ae30254033716d6
https://github.com/markshannon
markshannonhttps://github.com/python/cpython/commits?author=markshannon
9349daahttps://github.com/python/cpython/pull/27832/commits/9349daa9b9d763a2d3114f7d4ae30254033716d6
https://github.com/python/cpython/tree/9349daa9b9d763a2d3114f7d4ae30254033716d6
Prefix private function name with _https://github.com/python/cpython/pull/27832/commits/96496e256d87dba6e4554642e445885fd4799af0
https://github.com/markshannon
markshannonhttps://github.com/python/cpython/commits?author=markshannon
96496e2https://github.com/python/cpython/pull/27832/commits/96496e256d87dba6e4554642e445885fd4799af0
https://github.com/python/cpython/tree/96496e256d87dba6e4554642e445885fd4799af0
Reduce the number of casts.https://github.com/python/cpython/pull/27832/commits/5e4aad51ed94127100029d032d866445e0057037
https://github.com/markshannon
markshannonhttps://github.com/python/cpython/commits?author=markshannon
5e4aad5https://github.com/python/cpython/pull/27832/commits/5e4aad51ed94127100029d032d866445e0057037
https://github.com/python/cpython/tree/5e4aad51ed94127100029d032d866445e0057037
Avoid casting away top bits.https://github.com/python/cpython/pull/27832/commits/59ba47614f136ab0a68660ecd33a3a62c38c44d6
https://github.com/markshannon
markshannonhttps://github.com/python/cpython/commits?author=markshannon
59ba476https://github.com/python/cpython/pull/27832/commits/59ba47614f136ab0a68660ecd33a3a62c38c44d6
https://github.com/python/cpython/tree/59ba47614f136ab0a68660ecd33a3a62c38c44d6
Streamline integer negation and invert a bit. Suggested by Mark Dickinson.https://github.com/python/cpython/pull/27832/commits/0d3ca1d8e7dc06ff0c273861b1b97ef2bd604bd5
https://github.com/markshannon
markshannonhttps://github.com/python/cpython/commits?author=markshannon
0d3ca1dhttps://github.com/python/cpython/pull/27832/commits/0d3ca1d8e7dc06ff0c273861b1b97ef2bd604bd5
https://github.com/python/cpython/tree/0d3ca1d8e7dc06ff0c273861b1b97ef2bd604bd5
Clarify comment and internal function name. Remove a bit of redundant code.https://github.com/python/cpython/pull/27832/commits/c73333ba8d916cb7c2afeb573384fda62f18a53e
https://github.com/markshannon
markshannonhttps://github.com/python/cpython/commits?author=markshannon
c73333bhttps://github.com/python/cpython/pull/27832/commits/c73333ba8d916cb7c2afeb573384fda62f18a53e
https://github.com/python/cpython/tree/c73333ba8d916cb7c2afeb573384fda62f18a53e
Remove two more narrowing casts.https://github.com/python/cpython/pull/27832/commits/16d316702da83125e8a68a92f532ac4686b541a8
https://github.com/markshannon
markshannonhttps://github.com/python/cpython/commits?author=markshannon
16d3167https://github.com/python/cpython/pull/27832/commits/16d316702da83125e8a68a92f532ac4686b541a8
https://github.com/python/cpython/tree/16d316702da83125e8a68a92f532ac4686b541a8
Change _PyLong_FromLarge to use correctly sized int.https://github.com/python/cpython/pull/27832/commits/f20a2a803231530845344851f2f0df7c3dc14e9c
https://github.com/markshannon
markshannonhttps://github.com/python/cpython/commits?author=markshannon
f20a2a8https://github.com/python/cpython/pull/27832/commits/f20a2a803231530845344851f2f0df7c3dc14e9c
https://github.com/python/cpython/tree/f20a2a803231530845344851f2f0df7c3dc14e9c
Avoid more narrowings.https://github.com/python/cpython/pull/27832/commits/ab2b908b57654162a07b9876aa361664a6642f12
https://github.com/markshannon
markshannonhttps://github.com/python/cpython/commits?author=markshannon
ab2b908https://github.com/python/cpython/pull/27832/commits/ab2b908b57654162a07b9876aa361664a6642f12
https://github.com/python/cpython/tree/ab2b908b57654162a07b9876aa361664a6642f12
Revert get_small_int to taking a sdigit. Place narrowing casts in correct places.https://github.com/python/cpython/pull/27832/commits/e43060a0ebfd0f5415470fd8bf05d0569fa509db
https://github.com/markshannon
markshannonhttps://github.com/python/cpython/commits?author=markshannon
e43060ahttps://github.com/python/cpython/pull/27832/commits/e43060a0ebfd0f5415470fd8bf05d0569fa509db
https://github.com/python/cpython/tree/e43060a0ebfd0f5415470fd8bf05d0569fa509db
Use _PyLong_FromSTwoDigits not PyLong_FromLong in long_add.https://github.com/python/cpython/pull/27832/commits/ed2a4303ddcf4d92adcfc95f2d199b76b5b6179d
https://github.com/markshannon
markshannonhttps://github.com/python/cpython/commits?author=markshannon
ed2a430https://github.com/python/cpython/pull/27832/commits/ed2a4303ddcf4d92adcfc95f2d199b76b5b6179d
https://github.com/python/cpython/tree/ed2a4303ddcf4d92adcfc95f2d199b76b5b6179d
Implement PyLong_FromLong separately from _PyLong_FromSTwoDigits to allow for 15 bit digits on 64 bit machines.https://github.com/python/cpython/pull/27832/commits/1f2d47c5b2d9c5c300d16443d33f58af75873db6
https://github.com/markshannon
markshannonhttps://github.com/python/cpython/commits?author=markshannon
1f2d47chttps://github.com/python/cpython/pull/27832/commits/1f2d47c5b2d9c5c300d16443d33f58af75873db6
https://github.com/python/cpython/tree/1f2d47c5b2d9c5c300d16443d33f58af75873db6
Don't overflow shift in PyLong_FromLong.https://github.com/python/cpython/pull/27832/commits/649c31180fbf72416cfe3d063ca592769e2cf049
https://github.com/markshannon
markshannonhttps://github.com/python/cpython/commits?author=markshannon
649c311https://github.com/python/cpython/pull/27832/commits/649c31180fbf72416cfe3d063ca592769e2cf049
https://github.com/python/cpython/tree/649c31180fbf72416cfe3d063ca592769e2cf049
Convert IS_MEDIUM_INT macro to inline function.https://github.com/python/cpython/pull/27832/commits/a69f420e9f81e21cdcda5d57fa8d11e70139f680
https://github.com/markshannon
markshannonhttps://github.com/python/cpython/commits?author=markshannon
a69f420https://github.com/python/cpython/pull/27832/commits/a69f420e9f81e21cdcda5d57fa8d11e70139f680
https://github.com/python/cpython/tree/a69f420e9f81e21cdcda5d57fa8d11e70139f680
Edit commenthttps://github.com/python/cpython/pull/27832/commits/47571ffaeee4f9758876bb0de9e1e8ee594a36c7
https://github.com/markshannon
markshannonhttps://github.com/python/cpython/commits?author=markshannon
47571ffhttps://github.com/python/cpython/pull/27832/commits/47571ffaeee4f9758876bb0de9e1e8ee594a36c7
https://github.com/python/cpython/tree/47571ffaeee4f9758876bb0de9e1e8ee594a36c7
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.