René's URL Explorer Experiment


Title: gh-111139: Optimize math.gcd(int, int) by vstinner · Pull Request #113887 · python/cpython · GitHub

Open Graph Title: gh-111139: Optimize math.gcd(int, int) by vstinner · Pull Request #113887 · python/cpython

X Title: gh-111139: Optimize math.gcd(int, int) by vstinner · Pull Request #113887 · python/cpython

Description: Add a fast-path for the common case. Benchmark: python -m pyperf timeit \ -s 'import math; gcd=math.gcd; x=2*3; y=3*5' \ 'gcd(x,y)' Result: 1.07x faster (-3.4 ns) Mean +- std dev: 52.6 ns ...

Open Graph Description: Add a fast-path for the common case. Benchmark: python -m pyperf timeit \ -s 'import math; gcd=math.gcd; x=2*3; y=3*5' \ 'gcd(x,y)' Result: 1.07x faster (-3.4 ns) Mean +- s...

X Description: Add a fast-path for the common case. Benchmark: python -m pyperf timeit \ -s 'import math; gcd=math.gcd; x=2*3; y=3*5' \ 'gcd(x,y)' Result: 1.07x faster (-3...

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

X: @github

direct link

Domain: github.com

route-pattern/_view_fragments/voltron/pull_requests/show/:user_id/:repository/:id/pull_request_layout(.:format)
route-controllervoltron_pull_requests_fragments
route-actionpull_request_layout
fetch-noncev2:b723ae4a-d4d3-57fb-2d7b-ec710d5da00c
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idD028:1254A9:745AA3:A19B6F:696A7BFF
html-safe-nonce8ad276ffdb2d6951b72a8d0b4168e7d672e540193ac55dfe1b61e1becb5dd06f
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMDI4OjEyNTRBOTo3NDVBQTM6QTE5QjZGOjY5NkE3QkZGIiwidmlzaXRvcl9pZCI6IjU0Nzg4MDY4MDczNTU0ODkyODAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac4ca921e51badf30d3158a6791ab8d3c5cfe39fff8e77af85661fcf0116c06bf2
hovercard-subject-tagpull_request:1671577271
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///voltron/pull_requests_fragments/pull_request_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/voltron/pull_requests/show/python/cpython/113887/pull_request_layout
twitter:imagehttps://opengraph.githubassets.com/d836cb90a48a6560a02dcd097c833773b6033051b76db16c4ec87b5fe87522a6/python/cpython/pull/113887
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/d836cb90a48a6560a02dcd097c833773b6033051b76db16c4ec87b5fe87522a6/python/cpython/pull/113887
og:image:altAdd a fast-path for the common case. Benchmark: python -m pyperf timeit \ -s 'import math; gcd=math.gcd; x=2*3; y=3*5' \ 'gcd(x,y)' Result: 1.07x faster (-3.4 ns) Mean +- s...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamevstinner
hostnamegithub.com
expected-hostnamegithub.com
None5b774e44f85c14a75886edd04ddda4e5a25ddebbb241bcbb590b08a3048730e8
turbo-cache-controlno-preview
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
releasecc5f4eee261b3601c1e98e217ceaf28508b9567e
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/113887#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F113887
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%2F113887
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%2Fvoltron%2Fpull_requests_fragments%2Fpull_request_layout&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/pull/113887
Reloadhttps://github.com/python/cpython/pull/113887
Reloadhttps://github.com/python/cpython/pull/113887
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/113887
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/113887
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
Jump to bottomhttps://github.com/python/cpython/pull/113887#issue-comment-box
vstinnerhttps://github.com/vstinner
python:mainhttps://github.com/python/cpython/tree/main
vstinner:gcdhttps://github.com/vstinner/cpython/tree/gcd
gh-111139: Optimize math.gcd(int, int) https://github.com/python/cpython/pull/113887#top
vstinnerhttps://github.com/vstinner
python:mainhttps://github.com/python/cpython/tree/main
vstinner:gcdhttps://github.com/vstinner/cpython/tree/gcd
Conversation 5 https://github.com/python/cpython/pull/113887
Commits 2 https://github.com/python/cpython/pull/113887/commits
Checks 0 https://github.com/python/cpython/pull/113887/checks
Files changed https://github.com/python/cpython/pull/113887/files
Please reload this pagehttps://github.com/python/cpython/pull/113887
https://github.co/hiddenchars
https://github.com/python/cpython/pull/{{ revealButtonHref }}
https://github.com/vstinner
vstinnerhttps://github.com/vstinner
Jan 10, 2024https://github.com/python/cpython/pull/113887#issue-2073410942
Please reload this pagehttps://github.com/python/cpython/pull/113887
C API: Consider adding a public PyLong_GCD() function #111139https://github.com/python/cpython/issues/111139
Please reload this pagehttps://github.com/python/cpython/pull/113887
https://github.com/vstinner
pythongh-111139https://github.com/python/cpython/issues/111139
: Optimize math.gcd(int, int)https://github.com/python/cpython/pull/113887/commits/a7049b2ad5520f4f1558a5435e20791853a066ba
a7049b2https://github.com/python/cpython/pull/113887/commits/a7049b2ad5520f4f1558a5435e20791853a066ba
https://github.com/apps/bedevere-app
bedevere-apphttps://github.com/apps/bedevere-app
awaiting core review https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22awaiting%20core%20review%22
Jan 10, 2024https://github.com/python/cpython/pull/113887#event-11437400137
https://github.com/apps/bedevere-app
bedevere-apphttps://github.com/apps/bedevere-app
Jan 10, 2024 https://github.com/python/cpython/pull/113887#ref-issue-1955028595
C API: Consider adding a public PyLong_GCD() function #111139 https://github.com/python/cpython/issues/111139
https://github.com/vstinner
vstinnerhttps://github.com/vstinner
skip news https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22skip%20news%22
Jan 10, 2024https://github.com/python/cpython/pull/113887#event-11437411849
https://github.com/vstinner
vstinnerhttps://github.com/vstinner
Jan 10, 2024https://github.com/python/cpython/pull/113887#issuecomment-1884035166
@serhiy-storchakahttps://github.com/serhiy-storchaka
Please reload this pagehttps://github.com/python/cpython/pull/113887
https://github.com/scoder
scoderhttps://github.com/scoder
Jan 10, 2024 https://github.com/python/cpython/pull/113887#pullrequestreview-1812761237
View reviewed changes https://github.com/python/cpython/pull/113887/files/a7049b2ad5520f4f1558a5435e20791853a066ba
scoderhttps://github.com/scoder
https://github.com/python/cpython/pull/113887#pullrequestreview-1812761237
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/113887
https://github.com/apps/bedevere-app
bedevere-apphttps://github.com/apps/bedevere-app
awaiting merge https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22awaiting%20merge%22
awaiting core review https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22awaiting%20core%20review%22
Jan 10, 2024https://github.com/python/cpython/pull/113887#event-11440597912
https://github.com/serhiy-storchaka
serhiy-storchakahttps://github.com/serhiy-storchaka
Jan 10, 2024 https://github.com/python/cpython/pull/113887#pullrequestreview-1812882719
View reviewed changes https://github.com/python/cpython/pull/113887/files/a7049b2ad5520f4f1558a5435e20791853a066ba
serhiy-storchakahttps://github.com/serhiy-storchaka
https://github.com/python/cpython/pull/113887#pullrequestreview-1812882719
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/113887
Modules/mathmodule.chttps://github.com/python/cpython/pull/113887/files/a7049b2ad5520f4f1558a5435e20791853a066ba#diff-5b1186dfcc44670529aa53cb728a1c005f58f38324c24787a49f22cec36841c7
Please reload this pagehttps://github.com/python/cpython/pull/113887
https://github.com/vstinner
coding stylehttps://github.com/python/cpython/pull/113887/commits/753d766019711f534d7b89d4608f5eb99c0309b5
753d766https://github.com/python/cpython/pull/113887/commits/753d766019711f534d7b89d4608f5eb99c0309b5
https://github.com/vstinner
vstinnerhttps://github.com/vstinner
93930eahttps://github.com/python/cpython/commit/93930eaf0acd64dc0d08d58321d2682cb019bc1a
Jan 10, 2024https://github.com/python/cpython/pull/113887#event-11444912475
https://github.com/vstinner
vstinnerhttps://github.com/vstinner
January 10, 2024 15:38https://github.com/python/cpython/pull/113887#event-11444912684
https://github.com/apps/bedevere-app
bedevere-apphttps://github.com/apps/bedevere-app
awaiting merge https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22awaiting%20merge%22
Jan 10, 2024https://github.com/python/cpython/pull/113887#event-11444913191
Dev-Mwhttps://github.com/Dev-Mw
Jan 21, 2024 https://github.com/python/cpython/pull/113887#ref-commit-8870ee5
https://github.com/Dev-Mw
https://github.com/corona10
https://github.com/colesbury
https://github.com/iritkatriel
https://github.com/itamaro
https://github.com/AlexWaygood
https://github.com/hugovk
https://github.com/fipachu
https://github.com/brandtbucher
https://github.com/ordinary-jamie
https://github.com/wookie184
https://github.com/gvanrossum
https://github.com/barneygale
https://github.com/markshannon
https://github.com/pablogsal
https://github.com/ZackerySpytz
https://github.com/xdegaye
https://github.com/serhiy-storchaka
https://github.com/ronaldoussoren
https://github.com/terryjreedy
https://github.com/aisk
https://github.com/grigoriev-semyon
https://github.com/ramikg
https://github.com/tiran
https://github.com/gpshead
https://github.com/erlend-aasland
https://github.com/leecannon
https://github.com/skirpichev
https://github.com/neonene
https://github.com/rhettinger
https://github.com/kulikjak
https://github.com/kristjanvalur
https://github.com/zooba
https://github.com/mara004
https://github.com/wjandrea
https://github.com/AA-Turner
https://github.com/vsajip
https://github.com/WolframAlph
https://github.com/eendebakpt
https://github.com/stefanor
https://github.com/encukou
https://github.com/vstinner
https://github.com/sethmlarson
https://github.com/Eclips4
https://github.com/sobolevn
https://github.com/lazorchakp
https://github.com/felixxm
https://github.com/nedbat
https://github.com/Fidget-Spinner
https://github.com/JuliaPoo
https://github.com/apps/blurb-it
https://github.com/brettcannon
https://github.com/aloisklink
https://github.com/JoeyPearson822
https://github.com/zipperer
https://github.com/pieqq
https://github.com/InSyncWithFoo
https://github.com/slateny
https://github.com/jonfoster
https://github.com/thatbirdguythatuknownot
https://github.com/mdickinson
https://github.com/kamilturek
https://github.com/RaphaelMarinier
https://github.com/perrinjerome
https://github.com/mikeziminio
https://github.com/JonathonReinhart
https://github.com/hauntsaninja
https://github.com/0xSalikh
https://github.com/visitorckw
https://github.com/manosriram
https://github.com/Kaniee
https://github.com/Yhg1s
https://github.com/chgnrdv
https://github.com/befeleme
https://github.com/gaogaotiantian
https://github.com/ethanfurman
https://github.com/Sh3idan
https://github.com/christopheNan
https://github.com/buermarc
https://github.com/PurityLake
https://github.com/miyashiiii
https://github.com/kcatss
https://github.com/chrstphrchvz
https://github.com/pschanely
https://github.com/keithasaurus
https://github.com/DerSchinken
https://github.com/smontanaro
https://github.com/merwok
https://github.com/mpage
https://github.com/dhgutteridge
https://github.com/cdzhan
Merge from cpython (https://github.com/Dev-Mw/cpython/commit/8870ee53fe0540e7f15eeefb7fb77cbf56097358
#1https://github.com/Dev-Mw/cpython/pull/1
)https://github.com/Dev-Mw/cpython/commit/8870ee53fe0540e7f15eeefb7fb77cbf56097358
8870ee5https://github.com/Dev-Mw/cpython/commit/8870ee53fe0540e7f15eeefb7fb77cbf56097358
kulikjakhttps://github.com/kulikjak
Jan 22, 2024 https://github.com/python/cpython/pull/113887#ref-commit-5cf3752
https://github.com/vstinner
https://github.com/kulikjak
pythongh-111139https://github.com/python/cpython/issues/111139
: Optimize math.gcd(int, int) (https://github.com/kulikjak/cpython/commit/5cf3752f608b0c505459d55c6bdcc9bce3f82265
python#113887https://github.com/python/cpython/pull/113887
)https://github.com/kulikjak/cpython/commit/5cf3752f608b0c505459d55c6bdcc9bce3f82265
5cf3752https://github.com/kulikjak/cpython/commit/5cf3752f608b0c505459d55c6bdcc9bce3f82265
aiskhttps://github.com/aisk
Feb 11, 2024 https://github.com/python/cpython/pull/113887#ref-commit-6ea43a2
https://github.com/vstinner
https://github.com/aisk
pythongh-111139https://github.com/python/cpython/issues/111139
: Optimize math.gcd(int, int) (https://github.com/aisk/cpython/commit/6ea43a2ec886f902802d9a4c5fc24532be0f2e9c
python#113887https://github.com/python/cpython/pull/113887
)https://github.com/aisk/cpython/commit/6ea43a2ec886f902802d9a4c5fc24532be0f2e9c
6ea43a2https://github.com/aisk/cpython/commit/6ea43a2ec886f902802d9a4c5fc24532be0f2e9c
Glyphackhttps://github.com/Glyphack
Sep 2, 2024 https://github.com/python/cpython/pull/113887#ref-commit-f2caebc
https://github.com/vstinner
https://github.com/Glyphack
pythongh-111139https://github.com/python/cpython/issues/111139
: Optimize math.gcd(int, int) (https://github.com/Glyphack/cpython/commit/f2caebcf53586ef982a2952f2003482767cae6bd
python#113887https://github.com/python/cpython/pull/113887
)https://github.com/Glyphack/cpython/commit/f2caebcf53586ef982a2952f2003482767cae6bd
f2caebchttps://github.com/Glyphack/cpython/commit/f2caebcf53586ef982a2952f2003482767cae6bd
Sign up for freehttps://github.com/join?source=comment-repo
Sign in to commenthttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F113887
https://github.com/scoder
scoder https://github.com/scoder
https://github.com/python/cpython/pull/113887/files/a7049b2ad5520f4f1558a5435e20791853a066ba
https://github.com/serhiy-storchaka
serhiy-storchaka https://github.com/serhiy-storchaka
https://github.com/python/cpython/pull/113887/files/a7049b2ad5520f4f1558a5435e20791853a066ba
skip news https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22skip%20news%22
Please reload this pagehttps://github.com/python/cpython/pull/113887
https://github.com/vstinner
https://github.com/scoder
https://github.com/serhiy-storchaka
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.