Widen specialized int fast paths to full int64 range
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 77.2k
- Forks
- 35.9k
- PR merge metrics
- PR metrics pending
Description
This work widens the interpreter’s specialized int fast paths (tier-2 / uop execution) from the compact-only range to the full int64_t range.
It also fixes follow-up correctness issues in the widened specialized paths for non-compact exact PyLongObjects and on 15-bit builds.
Scope:
- widen specialized integer add/subtract/multiply fast paths to operate across the full
int64_trange - accept exact
intoperands that fit inint64_t, including non-compactPyLongObjects - keep specialized in-place mutation compact-only and fall back safely for non-compact inputs
- handle widened integer compare without compact-only assumptions
- construct widened arithmetic results with
PyLong_FromInt64()so 15-bit builds do not narrow throughstwodigits - add regression coverage for widened operations, non-compact exact ints, boundary cases, and overflow fallback
- add benchmark scripts for measuring widened specialized integer fast-path performance
Linked PRs
- gh-150425
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the interpreter’s tier-2/uop specialized integer add, subtract, multiply, and compare fast paths, including handling for PyLongObject operands. Review the regression coverage and benchmark scripts added for widened operations, then verify full int64_t boundaries, non-compact exact ints, overflow fallback, in-place mutation behavior, and 15-bit builds.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, python
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100