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_t range
- accept exact
int operands that fit in int64_t, including non-compact PyLongObjects
- 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 through stwodigits
- 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
This work widens the interpreter’s specialized
intfast paths (tier-2 / uop execution) from the compact-only range to the fullint64_trange.It also fixes follow-up correctness issues in the widened specialized paths for non-compact exact
PyLongObjects and on 15-bit builds.Scope:
int64_trangeintoperands that fit inint64_t, including non-compactPyLongObjectsPyLong_FromInt64()so 15-bit builds do not narrow throughstwodigitsLinked PRs