Widen specialized int fast paths to full int64 range
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 77.2k
- Forks
- 35.9k
- PR-Merge-Kennzahlen
- PR-Kennzahlen ausstehend
Beschreibung
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
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne damit, die spezialisierten Fast Paths für Integer-Addition, -Subtraktion, -Multiplikation und -Vergleich des Interpreters in tier-2/uop zu lokalisieren, einschließlich der Behandlung von PyLongObject-Operanden. Prüfe die für erweiterte Operationen hinzugefügte Regressionstestabdeckung und die Benchmark-Skripte. Verifiziere anschließend die vollständigen int64_t-Grenzen, nicht-kompakte Exact-Ints, den Fallback bei Überlauf, das Verhalten bei In-Place-Mutationen und 15-Bit-Builds.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- c, python
- Bereich
- compilers
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 25/100