Restore (or beat) Python 2 performance for arithmetic operations on ints that fit into a single word · Issue #101291 · python/cpython · GitHub

github.com

Tin mới

GitHub CopilotWrite better code with AI

GitHub Copilot appDirect agents from issue to merge

ActionsAutomate any workflow

CodespacesInstant dev environments

IssuesPlan and track work

Code ReviewManage code changes

Code QualityEnforce quality at merge

GitHub Advanced SecurityFind and fix vulnerabilities

Code securitySecure your code as you build

Secret protectionStop leaks before they start

View all use cases

Financial services

View all industries

Software Development

GitHub SponsorsFund open source developers

Copilot for BusinessEnterprise-grade AI features

Premium SupportEnterprise-grade 24/7 support

Pull requests 2.6k

Security and quality 0

interpreter-core(Objects, Python, Grammar, and Parser dirs)

performancePerformance or resource usage

faster-cpython/ideas#548

In Python 2 ints and longs were different objects, and the design of each was tailored to the different size and use cases. In Python3 we dropped the distinction, but we also dropped the design for ints that fit into a s

GH-101291: Refactor the PyLongObject struct #101292

GH-101291: Low level opt-in API for pylong #101685

GH-101291: Rearrange the size bits in PyLongObject #102464

GH-101291: Avoid using macros with casts in low-level long API. #104742

[3.12] GH-101291: Avoid using macros with casts in low-level long API. (GH-104742) #104759

GH-101291: Add warning to "what's new" that PyLongObject internals have changed. #107388

[3.12] GH-101291: Add warning to "what's new" that PyLongObject internals have changed. (GH-107388) #107392

gh-101291: Add versionadded directives for PyUnstable_Long_* #125384

[3.13] gh-101291: Add versionadded directives for PyUnstable_Long_* (GH-125384) #125407

[3.12] gh-101291: Add versionadded directives for PyUnstable_Long_* (GH-125384) #125408