| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:a55fca2a-2051-00a8-db81-5d21b3478f1f |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | C56C:2F6228:ADCE28:EFE64F:696A3533 |
| html-safe-nonce | cf27a9124507d69291e4adb2e2eb67b87f848a649ae99c754c056b05b9b8b457 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNTZDOjJGNjIyODpBRENFMjg6RUZFNjRGOjY5NkEzNTMzIiwidmlzaXRvcl9pZCI6IjkxODcyNDM0MTc5NzQ0ODYzMjMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | fe4fe2a350e1af752410e7386c52525f5bafcf5281eafbe987a5babebbc360f6 |
| hovercard-subject-tag | pull_request:800371537 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | ///pull_requests/show/files |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/python/cpython/pull/30044/files |
| twitter:image | https://avatars.githubusercontent.com/u/22539142?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/22539142?s=400&v=4 |
| og:image:alt | 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... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 321736bfdb3f591415ae895a0459bec204b26a76caf47ba5c980634cfacc4538 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7a9163cefd1ea4bd06f8eb7c082f43e4e53f626f |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| Skip to content | https://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 AI | https://github.com/features/copilot |
| GitHub SparkBuild and deploy intelligent apps | https://github.com/features/spark |
| GitHub ModelsManage and compare prompts | https://github.com/features/models |
| MCP RegistryNewIntegrate external tools | https://github.com/mcp |
| ActionsAutomate any workflow | https://github.com/features/actions |
| CodespacesInstant dev environments | https://github.com/features/codespaces |
| IssuesPlan and track work | https://github.com/features/issues |
| Code ReviewManage code changes | https://github.com/features/code-review |
| GitHub Advanced SecurityFind and fix vulnerabilities | https://github.com/security/advanced-security |
| Code securitySecure your code as you build | https://github.com/security/advanced-security/code-security |
| Secret protectionStop leaks before they start | https://github.com/security/advanced-security/secret-protection |
| Why GitHub | https://github.com/why-github |
| Documentation | https://docs.github.com |
| Blog | https://github.blog |
| Changelog | https://github.blog/changelog |
| Marketplace | https://github.com/marketplace |
| View all features | https://github.com/features |
| Enterprises | https://github.com/enterprise |
| Small and medium teams | https://github.com/team |
| Startups | https://github.com/enterprise/startups |
| Nonprofits | https://github.com/solutions/industry/nonprofits |
| App Modernization | https://github.com/solutions/use-case/app-modernization |
| DevSecOps | https://github.com/solutions/use-case/devsecops |
| DevOps | https://github.com/solutions/use-case/devops |
| CI/CD | https://github.com/solutions/use-case/ci-cd |
| View all use cases | https://github.com/solutions/use-case |
| Healthcare | https://github.com/solutions/industry/healthcare |
| Financial services | https://github.com/solutions/industry/financial-services |
| Manufacturing | https://github.com/solutions/industry/manufacturing |
| Government | https://github.com/solutions/industry/government |
| View all industries | https://github.com/solutions/industry |
| View all solutions | https://github.com/solutions |
| AI | https://github.com/resources/articles?topic=ai |
| Software Development | https://github.com/resources/articles?topic=software-development |
| DevOps | https://github.com/resources/articles?topic=devops |
| Security | https://github.com/resources/articles?topic=security |
| View all topics | https://github.com/resources/articles |
| Customer stories | https://github.com/customer-stories |
| Events & webinars | https://github.com/resources/events |
| Ebooks & reports | https://github.com/resources/whitepapers |
| Business insights | https://github.com/solutions/executive-insights |
| GitHub Skills | https://skills.github.com |
| Documentation | https://docs.github.com |
| Customer support | https://support.github.com |
| Community forum | https://github.com/orgs/community/discussions |
| Trust center | https://github.com/trust-center |
| Partners | https://github.com/partners |
| GitHub SponsorsFund open source developers | https://github.com/sponsors |
| Security Lab | https://securitylab.github.com |
| Maintainer Community | https://maintainers.github.com |
| Accelerator | https://github.com/accelerator |
| Archive Program | https://archiveprogram.github.com |
| Topics | https://github.com/topics |
| Trending | https://github.com/trending |
| Collections | https://github.com/collections |
| Enterprise platformAI-powered developer platform | https://github.com/enterprise |
| GitHub Advanced SecurityEnterprise-grade security features | https://github.com/security/advanced-security |
| Copilot for BusinessEnterprise-grade AI features | https://github.com/features/copilot/copilot-business |
| Premium SupportEnterprise-grade 24/7 support | https://github.com/premium-support |
| Pricing | https://github.com/pricing |
| Search syntax tips | https://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax |
| documentation | https://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 |
| Reload | https://github.com/python/cpython/pull/30044/files |
| Reload | https://github.com/python/cpython/pull/30044/files |
| Reload | https://github.com/python/cpython/pull/30044/files |
|
python
| https://github.com/python |
| cpython | https://github.com/python/cpython |
| Please reload this page | https://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 page | https://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 service | https://docs.github.com/terms |
| privacy statement | https://docs.github.com/privacy |
| Sign in | https://github.com/login?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose |
| mdickinson | https://github.com/mdickinson |
| python:main | https://github.com/python/cpython/tree/main |
| xuxinhang:feat/binary_shift_optimization | https://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 page | https://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 page | https://github.com/python/cpython/pull/30044/files |
| Please reload this page | https://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.py | https://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/ACKS | https://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.rst | https://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.c | https://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 page | https://github.com/python/cpython/pull/30044/files |
|
| https://github.com/python/cpython/pull/30044/files#diff-1a6e70e2beeecad88840c67284ac4d54a36998029244771fcc820e801390726a |
|
| https://github.com |
| Terms | https://docs.github.com/site-policy/github-terms/github-terms-of-service |
| Privacy | https://docs.github.com/site-policy/privacy-policies/github-privacy-statement |
| Security | https://github.com/security |
| Status | https://www.githubstatus.com/ |
| Community | https://github.community/ |
| Docs | https://docs.github.com/ |
| Contact | https://support.github.com?tags=dotcom-footer |