| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:248bc936-de16-e69d-f16b-f5c15d45b3d6 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 86AC:29E248:314742:3FD6D7:6A5AB9F9 |
| html-safe-nonce | fe07b8da44fd1660e6c813609cf5a32e290f948fddefb1c1cbecf902ce33a887 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NkFDOjI5RTI0ODozMTQ3NDI6M0ZENkQ3OjZBNUFCOUY5IiwidmlzaXRvcl9pZCI6IjExNDIzMzgzNzYyNjEzNTE5MjkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 9e8fce2181fb115029c4ae2cdcaae21c55c51bc18f01460a35cd8b1512f87d19 |
| hovercard-subject-tag | pull_request:667606080 |
| 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/26662/files |
| twitter:image | https://avatars.githubusercontent.com/u/14852019?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/14852019?s=400&v=4 |
| og:image:alt | BPO-44376
Reduce pow() overhead for small exponents.
Incidentally fixed a refcount oversight for
negative exponents.
https://bugs.python.org/issue44376 |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 2702febe50e53f9152dda552dc2049a5eb182778b2655abd5b8619e82e899b4a |
| 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 | c0211a077f9b056c5e115f996d9049616d85c3b5 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| Skip to content | https://github.com/python/cpython/pull/26662/files#start-of-content |
|
| https://github.com/ |
|
Sign in
| https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F26662%2Ffiles |
| GitHub CopilotWrite better code with AI | https://github.com/features/copilot |
| GitHub Copilot appDirect agents from issue to merge | https://github.com/features/ai/github-app |
| 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 |
| View all resources | https://github.com/resources |
| GitHub SponsorsFund open source developers | https://github.com/open-source/sponsors |
| Security Lab | https://securitylab.github.com |
| Maintainer Community | https://maintainers.github.com |
| Accelerator | https://github.com/open-source/accelerator |
| GitHub Stars | https://stars.github.com |
| 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/enterprise/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%2F26662%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/26662/files |
| Reload | https://github.com/python/cpython/pull/26662/files |
| Reload | https://github.com/python/cpython/pull/26662/files |
| Please reload this page | https://github.com/python/cpython/pull/26662/files |
|
python
| https://github.com/python |
| cpython | https://github.com/python/cpython |
| Please reload this page | https://github.com/python/cpython/pull/26662/files |
|
Notifications
| https://github.com/login?return_to=%2Fpython%2Fcpython |
|
Fork
34.9k
| https://github.com/login?return_to=%2Fpython%2Fcpython |
|
Star
73.8k
| 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.3k
| https://github.com/python/cpython/pulls |
|
Actions
| https://github.com/python/cpython/actions |
|
Projects
| https://github.com/python/cpython/projects |
|
Security and quality
0
| https://github.com/python/cpython/security |
|
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 and quality
| 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 |
| tim-one | https://github.com/tim-one |
| python:main | https://github.com/python/cpython/tree/main |
| tim-one:powdig | https://github.com/tim-one/cpython/tree/powdig |
|
Conversation
5
| https://github.com/python/cpython/pull/26662 |
|
Commits
10
| https://github.com/python/cpython/pull/26662/commits |
|
Checks
0
| https://github.com/python/cpython/pull/26662/checks |
|
Files changed
| https://github.com/python/cpython/pull/26662/files |
| Please reload this page | https://github.com/python/cpython/pull/26662/files |
|
bpo-44376 - reduce pow() overhead for small exponents
| https://github.com/python/cpython/pull/26662/files#top |
|
Show all changes
10 commits
| https://github.com/python/cpython/pull/26662/files |
|
9a2d559
First stab.
tim-one Jun 11, 2021
| https://github.com/python/cpython/pull/26662/commits/9a2d5590dbc3f51fdbb6abaaab56e2cdb7262c52 |
|
ff6e798
Repair that, e.g, pow(False, 1) returned False instead of 0.
tim-one Jun 11, 2021
| https://github.com/python/cpython/pull/26662/commits/ff6e798d741f531f10cda5dea4ff56380bf44c76 |
|
7f867fa
Fixed typo in comment.
tim-one Jun 11, 2021
| https://github.com/python/cpython/pull/26662/commits/7f867fa078862e6de62c132dcac0e0efaf7f4dc8 |
|
e8c4034
Search for the most significant exponent bit right-to-left
tim-one Jun 11, 2021
| https://github.com/python/cpython/pull/26662/commits/e8c403485926e192bb4021d0ddf586e4ba0fc4fb |
|
a3ace88
📜🤖 Added by blurb_it.
blurb-it[bot] Jun 11, 2021
| https://github.com/python/cpython/pull/26662/commits/a3ace88e5019dd4d56449fa971b505eef636f61a |
|
735a887
Merge remote-tracking branch 'upstream/main' into powdig
tim-one Jun 11, 2021
| https://github.com/python/cpython/pull/26662/commits/735a887f2267e34c7b5a86c1f4d5b4cc166dc852 |
|
7587a02
Skip the binary business entirely for exponents <= 3. It can't win
tim-one Jun 11, 2021
| https://github.com/python/cpython/pull/26662/commits/7587a02540b0d6420625228c3d461bd58be6585a |
|
2386d88
Make the bitmask variable of type `digit`. Using a giant signed int
tim-one Jun 11, 2021
| https://github.com/python/cpython/pull/26662/commits/2386d8833d9bfc6c1ce563b63fb7874c6fd2a4c8 |
|
c424322
And one more stab to reduce overhead for exponents <= 3.
tim-one Jun 12, 2021
| https://github.com/python/cpython/pull/26662/commits/c424322bf997d21a0a992623bdfa44f54985ec0c |
|
e3cd20a
Repaired typo in comment.
tim-one Jun 12, 2021
| https://github.com/python/cpython/pull/26662/commits/e3cd20a1a3cbca8dc259c3a6953fe3b8f386c122 |
|
Clear filters
| https://github.com/python/cpython/pull/26662/files |
| Please reload this page | https://github.com/python/cpython/pull/26662/files |
| Please reload this page | https://github.com/python/cpython/pull/26662/files |
|
2021-06-11-17-37-15.bpo-44376.zhM1UW.rst
| https://github.com/python/cpython/pull/26662/files#diff-a25b11d9c5eb99970055bd83ad49629e63912f53dd0afe69862e6a6094554f9d |
|
longobject.c
| https://github.com/python/cpython/pull/26662/files#diff-1a6e70e2beeecad88840c67284ac4d54a36998029244771fcc820e801390726a |
| Misc/NEWS.d/next/Core and Builtins/2021-06-11-17-37-15.bpo-44376.zhM1UW.rst | https://github.com/python/cpython/pull/26662/files#diff-a25b11d9c5eb99970055bd83ad49629e63912f53dd0afe69862e6a6094554f9d |
|
View file
| https://github.com/tim-one/cpython/blob/e3cd20a1a3cbca8dc259c3a6953fe3b8f386c122/Misc/NEWS.d/next/Core%20and%20Builtins/2021-06-11-17-37-15.bpo-44376.zhM1UW.rst |
|
Open in desktop
| https://desktop.github.com |
| https://github.co/hiddenchars |
| https://github.com/python/cpython/pull/26662/{{ revealButtonHref }} |
| Objects/longobject.c | https://github.com/python/cpython/pull/26662/files#diff-1a6e70e2beeecad88840c67284ac4d54a36998029244771fcc820e801390726a |
|
View file
| https://github.com/tim-one/cpython/blob/e3cd20a1a3cbca8dc259c3a6953fe3b8f386c122/Objects/longobject.c |
|
Open in desktop
| https://desktop.github.com |
| https://github.co/hiddenchars |
| https://github.com/python/cpython/pull/26662/{{ revealButtonHref }} |
|
| https://github.com/python/cpython/pull/26662/files#diff-1a6e70e2beeecad88840c67284ac4d54a36998029244771fcc820e801390726a |
|
| https://github.com/python/cpython/pull/26662/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 |