| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:91c52c62-73ea-12f8-613b-cf7407075955 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | B59C:356387:8C757F:B56C14:696B1AC7 |
| html-safe-nonce | 87f78523e92fcaad0b6b39a893f34b88419e195a4cfa292f7b04493c2cb9cdd2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNTlDOjM1NjM4Nzo4Qzc1N0Y6QjU2QzE0OjY5NkIxQUM3IiwidmlzaXRvcl9pZCI6Ijc4NTU5OTIyNTg2MzU0MzQ5NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 45e4bcd1035cb6bed38a2000485bc0493bf22d93f585b7fd7808c8d09fe4b5f1 |
| hovercard-subject-tag | pull_request:810622612 |
| 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/30277/files |
| twitter:image | https://avatars.githubusercontent.com/u/662003?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/662003?s=400&v=4 |
| og:image:alt | Taking some ideas from the work of @xuxinhang in #30044, this PR makes right shift of negative integers more efficient, by avoiding the need for temporary intermediate results.
Closes #90213
https... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d |
| 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 | 82560a55c6b2054555076f46e683151ee28a19bc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| Skip to content | https://github.com/python/cpython/pull/30277/files#start-of-content |
|
| https://github.com/ |
|
Sign in
| https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F30277%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%2F30277%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/30277/files |
| Reload | https://github.com/python/cpython/pull/30277/files |
| Reload | https://github.com/python/cpython/pull/30277/files |
|
python
| https://github.com/python |
| cpython | https://github.com/python/cpython |
| Please reload this page | https://github.com/python/cpython/pull/30277/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/30277/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 |
| markshannon | https://github.com/markshannon |
| python:main | https://github.com/python/cpython/tree/main |
| mdickinson:faster-rshift-of-negative | https://github.com/mdickinson/cpython/tree/faster-rshift-of-negative |
|
Conversation
34
| https://github.com/python/cpython/pull/30277 |
|
Commits
15
| https://github.com/python/cpython/pull/30277/commits |
|
Checks
0
| https://github.com/python/cpython/pull/30277/checks |
|
Files changed
| https://github.com/python/cpython/pull/30277/files |
| Please reload this page | https://github.com/python/cpython/pull/30277/files |
|
gh-90213: Speed up right shifts of negative integers
| https://github.com/python/cpython/pull/30277/files#top |
|
Show all changes
15 commits
| https://github.com/python/cpython/pull/30277/files |
|
9bf9dcd
bpo-46055: Speed up right shifts of negative integers
mdickinson Dec 27, 2021
| https://github.com/python/cpython/pull/30277/commits/9bf9dcdd3342e9e770de23439065d46e07401a5c |
|
ad69e48
Rework to remove duplication and move the shift==0 check earlier.
mdickinson Dec 28, 2021
| https://github.com/python/cpython/pull/30277/commits/ad69e48167b2719a5435a5915a57357a24f9add7 |
|
cf7de3b
Update NEWS.d entry
mdickinson Dec 28, 2021
| https://github.com/python/cpython/pull/30277/commits/cf7de3b61ce7ef946a8ff5a067dead6dd1ff61cb |
|
41de654
Revert unrelated spacing change
mdickinson Dec 28, 2021
| https://github.com/python/cpython/pull/30277/commits/41de654f314beec029806b57e5d3de9834509281 |
|
27843b1
Fix unidiomatic decrement
mdickinson Dec 28, 2021
| https://github.com/python/cpython/pull/30277/commits/27843b180f4267667a5639c30a7430e1d8b3644a |
|
53a4e24
Don't handle the shift==0 special-case until we need to
mdickinson Dec 28, 2021
| https://github.com/python/cpython/pull/30277/commits/53a4e245f931eac4fbce4acae4c44dda55bad813 |
|
b3a1a8f
Fix incompatible types
mdickinson Dec 28, 2021
| https://github.com/python/cpython/pull/30277/commits/b3a1a8f9d09f094cf2821da9bd3453ac6d750884 |
|
fd4ce81
Comment updates
mdickinson Jan 9, 2022
| https://github.com/python/cpython/pull/30277/commits/fd4ce81854531f419bd0617cd984c346038e3f60 |
|
447e508
Updates from review
mdickinson Apr 12, 2022
| https://github.com/python/cpython/pull/30277/commits/447e508c517f3e4a20520ac16a4eebb88ea37f7b |
|
1bf4063
Clean up loop declarations
mdickinson Apr 12, 2022
| https://github.com/python/cpython/pull/30277/commits/1bf40635e705cec8a47e5cf33b98000a0ecb78d1 |
|
cfe47ac
Fix comment
mdickinson Apr 12, 2022
| https://github.com/python/cpython/pull/30277/commits/cfe47ac5b1c688618362bd652680da18fc5fc12d |
|
68e10a3
Remove an unnecessary 'else' branch
mdickinson Apr 12, 2022
| https://github.com/python/cpython/pull/30277/commits/68e10a3d16de71eb0a49cea0272b4d24d5deaac8 |
|
5d8d8ef
New news entry
mdickinson Apr 12, 2022
| https://github.com/python/cpython/pull/30277/commits/5d8d8ef908710372d123c4565bbd62671463d682 |
|
c5e3f81
Merge remote-tracking branch 'upstream/main' into faster-rshift-of-ne…
mdickinson Apr 12, 2022
| https://github.com/python/cpython/pull/30277/commits/c5e3f816216e538977b833054bf65210e2242b2f |
|
82c5ccd
One more assert
mdickinson Apr 12, 2022
| https://github.com/python/cpython/pull/30277/commits/82c5ccdb7035a28aadb969a2f2958dc2b8469a95 |
|
Clear filters
| https://github.com/python/cpython/pull/30277/files |
| Please reload this page | https://github.com/python/cpython/pull/30277/files |
| Please reload this page | https://github.com/python/cpython/pull/30277/files |
|
test_long.py
| https://github.com/python/cpython/pull/30277/files#diff-02037b51ab56d36386bd847e681b34c3d6603b5ec033cfea65fc92357697a478 |
|
2022-04-12-09-40-57.gh-issue-46055.IPb1HA.rst
| https://github.com/python/cpython/pull/30277/files#diff-350534e6b61ddbbca0ea00a39067e5d34f3d0a1ce36072e3531a09d40a9e7d4b |
|
longobject.c
| https://github.com/python/cpython/pull/30277/files#diff-1a6e70e2beeecad88840c67284ac4d54a36998029244771fcc820e801390726a |
| Lib/test/test_long.py | https://github.com/python/cpython/pull/30277/files#diff-02037b51ab56d36386bd847e681b34c3d6603b5ec033cfea65fc92357697a478 |
|
View file
| https://github.com/mdickinson/cpython/blob/82c5ccdb7035a28aadb969a2f2958dc2b8469a95/Lib/test/test_long.py |
|
Open in desktop
| https://desktop.github.com |
| https://github.co/hiddenchars |
| https://github.com/python/cpython/pull/30277/{{ revealButtonHref }} |
|
| https://github.com/python/cpython/pull/30277/files#diff-02037b51ab56d36386bd847e681b34c3d6603b5ec033cfea65fc92357697a478 |
|
| https://github.com/python/cpython/pull/30277/files#diff-02037b51ab56d36386bd847e681b34c3d6603b5ec033cfea65fc92357697a478 |
| Misc/NEWS.d/next/Core and Builtins/2022-04-12-09-40-57.gh-issue-46055.IPb1HA.rst | https://github.com/python/cpython/pull/30277/files#diff-350534e6b61ddbbca0ea00a39067e5d34f3d0a1ce36072e3531a09d40a9e7d4b |
|
View file
| https://github.com/mdickinson/cpython/blob/82c5ccdb7035a28aadb969a2f2958dc2b8469a95/Misc/NEWS.d/next/Core%20and%20Builtins/2022-04-12-09-40-57.gh-issue-46055.IPb1HA.rst |
|
Open in desktop
| https://desktop.github.com |
| https://github.co/hiddenchars |
| https://github.com/python/cpython/pull/30277/{{ revealButtonHref }} |
| Objects/longobject.c | https://github.com/python/cpython/pull/30277/files#diff-1a6e70e2beeecad88840c67284ac4d54a36998029244771fcc820e801390726a |
|
View file
| https://github.com/mdickinson/cpython/blob/82c5ccdb7035a28aadb969a2f2958dc2b8469a95/Objects/longobject.c |
|
Open in desktop
| https://desktop.github.com |
| https://github.co/hiddenchars |
| https://github.com/python/cpython/pull/30277/{{ revealButtonHref }} |
|
| https://github.com/python/cpython/pull/30277/files#diff-1a6e70e2beeecad88840c67284ac4d54a36998029244771fcc820e801390726a |
|
| https://github.com/python/cpython/pull/30277/files#diff-1a6e70e2beeecad88840c67284ac4d54a36998029244771fcc820e801390726a |
| Please reload this page | https://github.com/python/cpython/pull/30277/files |
|
| https://github.com/python/cpython/pull/30277/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 |