René's URL Explorer Experiment


Title: bpo-46055: Speed up binary shifting operators by xuxinhang · Pull Request #30044 · python/cpython · GitHub

Open Graph Title: bpo-46055: Speed up binary shifting operators by xuxinhang · Pull Request #30044 · python/cpython

X Title: bpo-46055: Speed up binary shifting operators by xuxinhang · Pull Request #30044 · python/cpython

Description: Inspired by https://bugs.python.org/issue44946, I found there were no special shortcuts for shifting operation applied to "medium value" long object. So I modified CPython's VM to accelerate my python project where there is plenty of binary shifting operation. I guess somebody else might also need it. Thanks. https://bugs.python.org/issue46055

Open Graph Description: Inspired by https://bugs.python.org/issue44946, I found there were no special shortcuts for shifting operation applied to "medium value" long object. So I modified CPython's VM to acc...

X Description: Inspired by https://bugs.python.org/issue44946, I found there were no special shortcuts for shifting operation applied to "medium value" long object. So I modified CPython&#39...

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

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:a55fca2a-2051-00a8-db81-5d21b3478f1f
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idC56C:2F6228:ADCE28:EFE64F:696A3533
html-safe-noncecf27a9124507d69291e4adb2e2eb67b87f848a649ae99c754c056b05b9b8b457
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNTZDOjJGNjIyODpBRENFMjg6RUZFNjRGOjY5NkEzNTMzIiwidmlzaXRvcl9pZCI6IjkxODcyNDM0MTc5NzQ0ODYzMjMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacfe4fe2a350e1af752410e7386c52525f5bafcf5281eafbe987a5babebbc360f6
hovercard-subject-tagpull_request:800371537
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/30044/files
twitter:imagehttps://avatars.githubusercontent.com/u/22539142?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/22539142?s=400&v=4
og:image:altInspired by https://bugs.python.org/issue44946, I found there were no special shortcuts for shifting operation applied to "medium value" long object. So I modified CPython's VM to acc...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None321736bfdb3f591415ae895a0459bec204b26a76caf47ba5c980634cfacc4538
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
release7a9163cefd1ea4bd06f8eb7c082f43e4e53f626f
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/30044/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F30044%2Ffiles
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%2F30044%2Ffiles
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%2Ffiles&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/pull/30044/files
Reloadhttps://github.com/python/cpython/pull/30044/files
Reloadhttps://github.com/python/cpython/pull/30044/files
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/30044/files
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/30044/files
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
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
mdickinsonhttps://github.com/mdickinson
python:mainhttps://github.com/python/cpython/tree/main
xuxinhang:feat/binary_shift_optimizationhttps://github.com/xuxinhang/cpython/tree/feat/binary_shift_optimization
Conversation 64 https://github.com/python/cpython/pull/30044
Commits 18 https://github.com/python/cpython/pull/30044/commits
Checks 0 https://github.com/python/cpython/pull/30044/checks
Files changed https://github.com/python/cpython/pull/30044/files
Please reload this pagehttps://github.com/python/cpython/pull/30044/files
bpo-46055: Speed up binary shifting operators https://github.com/python/cpython/pull/30044/files#top
Show all changes 18 commits https://github.com/python/cpython/pull/30044/files
7b11d7d Perf: Accelerate binary shift op. xuxinhang Dec 11, 2021 https://github.com/python/cpython/pull/30044/commits/7b11d7d64675b5d84c6a35ba2e18783b27227d58
403652a Fix: Ubuntu gcc segment fault. xuxinhang Dec 12, 2021 https://github.com/python/cpython/pull/30044/commits/403652a9672037daaa7dfd013009a0be645ac845
dcd2796 Let PyLong_New accept a negtive size. xuxinhang Dec 12, 2021 https://github.com/python/cpython/pull/30044/commits/dcd27965954068aaa79b0a84bfae807bea5f1d58
25bbf4d Fix: Use Py_ARITHMETIC_RIGHT_SHIFT to avoid the undefined padding bah… xuxinhang Dec 12, 2021 https://github.com/python/cpython/pull/30044/commits/25bbf4de2f11c0177c8e5f2c27338a8ea6182730
b2ef93d Style: PEP7: add braces. xuxinhang Dec 12, 2021 https://github.com/python/cpython/pull/30044/commits/b2ef93da5083531d2f7dd5c1d7eb08523a57ee30
7d2203f Fix: Bypass undefined shift operator behavior xuxinhang Dec 13, 2021 https://github.com/python/cpython/pull/30044/commits/7d2203f2777e1650c36c3c3a20856c7752a4ab9d
932ad87 Revert "Let PyLong_New accept a negtive size." xuxinhang Dec 22, 2021 https://github.com/python/cpython/pull/30044/commits/932ad87e7c431cbeae649da01cc0267d41200c8c
596b8cf Revert: Remove additional inline keywords. xuxinhang Dec 22, 2021 https://github.com/python/cpython/pull/30044/commits/596b8cfba788ceb2614348d93beb0e9084bc8684
6545e9a Refactor: Simpilify code by using _PyLong_FromSTwoDigit xuxinhang Dec 23, 2021 https://github.com/python/cpython/pull/30044/commits/6545e9a83ca95ad27b003a5ad4d789ae2bd3ff20
7f80cd9 Fix: Wrong rshift result. xuxinhang Dec 23, 2021 https://github.com/python/cpython/pull/30044/commits/7f80cd924c96046f61077b4de68894c4fb7f185a
b24c7dc Test: More testcases. xuxinhang Dec 23, 2021 https://github.com/python/cpython/pull/30044/commits/b24c7dcc7da47c69519a693401c9f66af742a030
c00a963 Refactor: Clean code. xuxinhang Dec 23, 2021 https://github.com/python/cpython/pull/30044/commits/c00a963661a9a48a9b29119b5f7eded570a37d77
b7ad599 Revert: Revert unrelated code. xuxinhang Dec 23, 2021 https://github.com/python/cpython/pull/30044/commits/b7ad599894bdbf6aa3d78c7d37342f81de225f72
c359521 Docs: A couple more things. xuxinhang Dec 24, 2021 https://github.com/python/cpython/pull/30044/commits/c359521056e3078b16f73a24c24a90e63784dc08
241da4c Revert: medium_value xuxinhang Dec 24, 2021 https://github.com/python/cpython/pull/30044/commits/241da4c272d4252a9cf71c3f29230152c50ce205
9ed09aa Add attribution; fix typo mdickinson Dec 27, 2021 https://github.com/python/cpython/pull/30044/commits/9ed09aad05cb701c30995ed9516d0dfb241721ab
c24ad0a Merge branch 'main' into feat/binary_shift_optimization mdickinson Dec 27, 2021 https://github.com/python/cpython/pull/30044/commits/c24ad0a96db313d8780e14cb50db83dd8222a049
59672cf Merge remote-tracking branch 'upstream/main' into feat/binary_shift_o… mdickinson Dec 27, 2021 https://github.com/python/cpython/pull/30044/commits/59672cfbb4c013a602676df0157be377174deb45
Clear filters https://github.com/python/cpython/pull/30044/files
Please reload this pagehttps://github.com/python/cpython/pull/30044/files
Please reload this pagehttps://github.com/python/cpython/pull/30044/files
test_long.py https://github.com/python/cpython/pull/30044/files#diff-02037b51ab56d36386bd847e681b34c3d6603b5ec033cfea65fc92357697a478
ACKS https://github.com/python/cpython/pull/30044/files#diff-d1243956feb505c5459fc05387e194609efb5c350cee202942be47ed30d7d7d0
2021-12-24-20-21-45.bpo-46055.R0QMVQ.rst https://github.com/python/cpython/pull/30044/files#diff-c9d66429597a0ca7027a30e22eeb7d8d4dc32076d77f4b631764afb219f6d8fa
longobject.c https://github.com/python/cpython/pull/30044/files#diff-1a6e70e2beeecad88840c67284ac4d54a36998029244771fcc820e801390726a
Lib/test/test_long.pyhttps://github.com/python/cpython/pull/30044/files#diff-02037b51ab56d36386bd847e681b34c3d6603b5ec033cfea65fc92357697a478
View file https://github.com/xuxinhang/cpython/blob/59672cfbb4c013a602676df0157be377174deb45/Lib/test/test_long.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/30044/{{ revealButtonHref }}
https://github.com/python/cpython/pull/30044/files#diff-02037b51ab56d36386bd847e681b34c3d6603b5ec033cfea65fc92357697a478
https://github.com/python/cpython/pull/30044/files#diff-02037b51ab56d36386bd847e681b34c3d6603b5ec033cfea65fc92357697a478
https://github.com/python/cpython/pull/30044/files#diff-02037b51ab56d36386bd847e681b34c3d6603b5ec033cfea65fc92357697a478
Misc/ACKShttps://github.com/python/cpython/pull/30044/files#diff-d1243956feb505c5459fc05387e194609efb5c350cee202942be47ed30d7d7d0
View file https://github.com/xuxinhang/cpython/blob/59672cfbb4c013a602676df0157be377174deb45/Misc/ACKS
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/30044/{{ revealButtonHref }}
https://github.com/python/cpython/pull/30044/files#diff-d1243956feb505c5459fc05387e194609efb5c350cee202942be47ed30d7d7d0
https://github.com/python/cpython/pull/30044/files#diff-d1243956feb505c5459fc05387e194609efb5c350cee202942be47ed30d7d7d0
Misc/NEWS.d/next/Core and Builtins/2021-12-24-20-21-45.bpo-46055.R0QMVQ.rsthttps://github.com/python/cpython/pull/30044/files#diff-c9d66429597a0ca7027a30e22eeb7d8d4dc32076d77f4b631764afb219f6d8fa
View file https://github.com/xuxinhang/cpython/blob/59672cfbb4c013a602676df0157be377174deb45/Misc/NEWS.d/next/Core%20and%20Builtins/2021-12-24-20-21-45.bpo-46055.R0QMVQ.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/30044/{{ revealButtonHref }}
Objects/longobject.chttps://github.com/python/cpython/pull/30044/files#diff-1a6e70e2beeecad88840c67284ac4d54a36998029244771fcc820e801390726a
View file https://github.com/xuxinhang/cpython/blob/59672cfbb4c013a602676df0157be377174deb45/Objects/longobject.c
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/30044/{{ revealButtonHref }}
https://github.com/python/cpython/pull/30044/files#diff-1a6e70e2beeecad88840c67284ac4d54a36998029244771fcc820e801390726a
https://github.com/python/cpython/pull/30044/files#diff-1a6e70e2beeecad88840c67284ac4d54a36998029244771fcc820e801390726a
https://github.com/python/cpython/pull/30044/files#diff-1a6e70e2beeecad88840c67284ac4d54a36998029244771fcc820e801390726a
Please reload this pagehttps://github.com/python/cpython/pull/30044/files
https://github.com/python/cpython/pull/30044/files#diff-1a6e70e2beeecad88840c67284ac4d54a36998029244771fcc820e801390726a
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.