Skip to content

Widen JIT int fast paths to full int64 range #150424

@KRRT7

Description

@KRRT7

This work widens the JIT int fast paths from the compact-only range to the full int64_t range.

It also fixes follow-up correctness issues in specialized widened paths for non-compact exact PyLongObjects and on 15-bit builds.

Scope:

  • widen JIT 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 JIT integer fast-path performance

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    interpreter-core(Objects, Python, Grammar, and Parser dirs)pendingThe issue will be closed if no feedback is providedperformancePerformance or resource usagetopic-JIT
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions