Skip to content

TypedPython: chunked eval-breaker polling for range loops (#141 follow-up) #206

Closed

Description

@b-re-w

#141 phase 1 polls the eval breaker on every loop iteration through a register countdown, so fannkuch costs +8.2% against develop (median 1.082, range 1.043 to 1.191; with loop polls removed it is 1.000). The leader accepted this as the price of the fix.

Follow-up (b): for a ForRange loop the trip count is known, so split it into chunks of TP_POLL_INTERVAL iterations and poll once per chunk. break/continue must keep their meaning across the chunk loop. while loops keep the per-iteration countdown.

Done when: the eval-breaker tests stay green, a test shows KeyboardInterrupt still reaches a long range loop, and fannkuch and spectral-norm are re-measured (interleaved, quiet window).

Activity

  1. added a commit that references this issue on Oct 24, 2026
  2. b-re-w commented on Oct 24, 2026

    @b-re-w
    MemberAuthor

    Landed in develop via #260

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions