You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
TypedPython: depth precheck, fast entry and inlining for acyclic callees (spectral-norm) #147
Approved by the user (2026-10-04) from docs/investigations/typedpython-vs-cython-numba-lpython.md. spectral-norm is 6.3x (M2 needs 10x, #41); its hot path is a leaf call per inner iteration paying tp_enter_call/tp_leave_call.
Design (agreed in #41): a callee outside every call cycle adds at most k frames (k static). A precheck depth + k <= limit at the cycle entry or wrapper selects a fast entry without enter/leave, so the C compiler can inline it. If the precheck fails, the call runs the normal per-call path, never an early RecursionError.
Done when: tests compare with the interpreter at every depth between limit-k and limit (result, RecursionError, and at which call); a mutation that takes the fast path despite a failed precheck fails them; spectral-norm re-measured (interleaved, quiet window).
Activity
Feat: Exact frame count at redo and poll points inside fast trees (#147)
Bench: Record the fast-entry A/B (#147)
Merge pull request #210 from thisisthepy/feat/tp-fast-entry
b-re-w commentedon Oct 17, 2026
Landed in develop via #210. spectral-norm 5.6x -> 59.4x against CPython (interleaved, quiet window).