René's URL Explorer Experiment


Title: gh-162477: Use `PyLong_AsDouble()` for exact ints in `PyFloat_AsDouble()` by maurycy · Pull Request #162478 · python/cpython · GitHub

Open Graph Title: gh-162477: Use `PyLong_AsDouble()` for exact ints in `PyFloat_AsDouble()` by maurycy · Pull Request #162478 · python/cpython

X Title: gh-162477: Use `PyLong_AsDouble()` for exact ints in `PyFloat_AsDouble()` by maurycy · Pull Request #162478 · python/cpython

Description: Call PyLong_AsDouble() directly for exact int arguments. PGO+LTO macOS M4: Operation Baseline Patched Baseline / patched sqrt(42) 16.40 ns 13.06 ns 1.256× pack(1, 2, 3) 40.08 ns 30.64 ns 1.308× array('d', ints) 10.31 µs 7.19 µs 1.433× array('d', floats) (control) 6.65 µs 6.16 µs 1.080× pyperf bench from array import array from math import sqrt from struct import Struct import pyperf ints = list(range(1, 1001)) floats = list(map(float, ints)) large_int = 2**200 pack = Struct("!ddd").pack runner = pyperf.Runner() for stmt in ( "sqrt(42)", "sqrt(42.0)", "sqrt(large_int)", "sum(map(sqrt, ints))", "sum(map(sqrt, floats))", "pack(1, 2, 3)", "pack(1.0, 2.0, 3.0)", "array('d', ints)", "array('d', floats)", ): runner.timeit(stmt, stmt, globals=globals()) Closes #162477 Issue: gh-162477

Open Graph Description: Call PyLong_AsDouble() directly for exact int arguments. PGO+LTO macOS M4: Operation Baseline Patched Baseline / patched sqrt(42) 16.40 ns 13.06 ns 1.256× pack(1, 2, 3) 40.08 ns 30.64 ns 1...

X Description: Call PyLong_AsDouble() directly for exact int arguments. PGO+LTO macOS M4: Operation Baseline Patched Baseline / patched sqrt(42) 16.40 ns 13.06 ns 1.256× pack(1, 2, 3) 40.08 ns 30.64 ns 1...

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

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.4

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:52b9e23d-35dd-cd9f-bc93-2b346d76d574
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idDEBC:27D516:1122373:16BB753:6B06528A
html-safe-noncee73a1f0f4935734f2ed7842d10be10de1b93760b0cf23bfed131470d9359ab1f
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERUJDOjI3RDUxNjoxMTIyMzczOjE2QkI3NTM6NkIwNjUyOEEiLCJ2aXNpdG9yX2lkIjoiNjI1ODc5NDI3NDQ1MzA4Mjc2MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac97284b71f14cf4407aa15d0583b7eceeeea9607ee13aeb96ade2344f2a0d0d30
hovercard-subject-tagpull_request:5449535222
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/162478/files
twitter:imagehttps://avatars.githubusercontent.com/u/5383?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/5383?s=400&v=4
og:image:altCall PyLong_AsDouble() directly for exact int arguments. PGO+LTO macOS M4: Operation Baseline Patched Baseline / patched sqrt(42) 16.40 ns 13.06 ns 1.256× pack(1, 2, 3) 40.08 ns 30.64 ns 1...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None772b6997ca4daa0428dd49a25d76052e765555ae560fe9c88517eb828bbd861e
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
releasef1f9a08f7c769a37f1dfc18ad43d463c222a7eea
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/162478/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F162478%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
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
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://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/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F162478%2Ffiles
Sign uphttps://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/162478/files
Reloadhttps://github.com/python/cpython/pull/162478/files
Reloadhttps://github.com/python/cpython/pull/162478/files
pythonhttps://github.com/python
cpythonhttps://github.com/python/cpython
Codehttps://github.com/python/cpython
Issues5k+ (5k+)https://github.com/python/cpython/issues
Pull requests2.4k (2.4k)https://github.com/python/cpython/pulls
Actionshttps://github.com/python/cpython/actions
Projectshttps://github.com/python/cpython/projects
Security and qualityhttps://github.com/python/cpython/security
Insightshttps://github.com/python/cpython/insights
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
StanFromIrelandhttps://github.com/StanFromIreland
python:mainhttps://github.com/python/cpython/tree/main
maurycy:pyfloat-asdouble-inthttps://github.com/maurycy/cpython/tree/pyfloat-asdouble-int
Conversation 6 https://github.com/python/cpython/pull/162478
Commits 5 https://github.com/python/cpython/pull/162478/commits
Checks 55 https://github.com/python/cpython/pull/162478/checks
Files changed https://github.com/python/cpython/pull/162478/files
Please reload this pagehttps://github.com/python/cpython/pull/162478/files
gh-162477: Use PyLong_AsDouble() for exact ints in PyFloat_AsDouble() https://github.com/python/cpython/pull/162478/files#top
Show all changes 5 commits https://github.com/python/cpython/pull/162478/files
7e46953 up maurycy Nov 23, 2026 https://github.com/python/cpython/pull/162478/commits/7e46953f36dc3a7e6006911fecfc1931b51cc179
a3ef75f tet maurycy Nov 23, 2026 https://github.com/python/cpython/pull/162478/commits/a3ef75fa4405ad4af2a32ace860459f80a923e57
1610574 nius maurycy Nov 23, 2026 https://github.com/python/cpython/pull/162478/commits/16105749001240d9d884e781e2982edfa8afa85f
1e6162c its core, not lib maurycy Nov 23, 2026 https://github.com/python/cpython/pull/162478/commits/1e6162c09895c172399b8c38d61bdefdcd6f659e
c0e446d Update Objects/floatobject.c maurycy Nov 23, 2026 https://github.com/python/cpython/pull/162478/commits/c0e446d2de2627726dc3fac061ed5fdeb45a9397
Clear filters https://github.com/python/cpython/pull/162478/files
Please reload this pagehttps://github.com/python/cpython/pull/162478/files
Please reload this pagehttps://github.com/python/cpython/pull/162478/files
test_float.py https://github.com/python/cpython/pull/162478/files#diff-dfb52509777790fbc5dc9842b814f0cb46423bf1cd5bb484b1624eccd6013a4c
2026-11-23-09-17-41.gh-issue-162477.TEcSpB.rst https://github.com/python/cpython/pull/162478/files#diff-bc87d5c801019225aa5cbd5c72887a29a751e8b51afd8705a09787c5548554c7
floatobject.c https://github.com/python/cpython/pull/162478/files#diff-3651445c9f72daa1fdf6577b10902d4ceee89aa99295e01fcab07b58767a935f
Lib/test/test_capi/test_float.pyhttps://github.com/python/cpython/pull/162478/files#diff-dfb52509777790fbc5dc9842b814f0cb46423bf1cd5bb484b1624eccd6013a4c
View file https://github.com/maurycy/cpython/blob/c0e446d2de2627726dc3fac061ed5fdeb45a9397/Lib/test/test_capi/test_float.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/162478/{{ revealButtonHref }}
https://github.com/python/cpython/pull/162478/files#diff-dfb52509777790fbc5dc9842b814f0cb46423bf1cd5bb484b1624eccd6013a4c
https://github.com/python/cpython/pull/162478/files#diff-dfb52509777790fbc5dc9842b814f0cb46423bf1cd5bb484b1624eccd6013a4c
Misc/NEWS.d/next/Core_and_Builtins/2026-11-23-09-17-41.gh-issue-162477.TEcSpB.rsthttps://github.com/python/cpython/pull/162478/files#diff-bc87d5c801019225aa5cbd5c72887a29a751e8b51afd8705a09787c5548554c7
View file https://github.com/maurycy/cpython/blob/c0e446d2de2627726dc3fac061ed5fdeb45a9397/Misc/NEWS.d/next/Core_and_Builtins/2026-11-23-09-17-41.gh-issue-162477.TEcSpB.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/162478/{{ revealButtonHref }}
Objects/floatobject.chttps://github.com/python/cpython/pull/162478/files#diff-3651445c9f72daa1fdf6577b10902d4ceee89aa99295e01fcab07b58767a935f
View file https://github.com/maurycy/cpython/blob/c0e446d2de2627726dc3fac061ed5fdeb45a9397/Objects/floatobject.c
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/162478/{{ revealButtonHref }}
https://github.com/python/cpython/pull/162478/files#diff-3651445c9f72daa1fdf6577b10902d4ceee89aa99295e01fcab07b58767a935f
Please reload this pagehttps://github.com/python/cpython/pull/162478/files
https://github.com/python/cpython/pull/162478/files#diff-3651445c9f72daa1fdf6577b10902d4ceee89aa99295e01fcab07b58767a935f
Please reload this pagehttps://github.com/python/cpython/pull/162478/files
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

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlno-cache

Viewport: width=device-width


URLs of crawlers that visited me.