TJC-1814: Python 3.14 default; numba-jitted vertex enumeration (4.2x certify-sweep) - #5
Merged
Merged
Conversation
…certify-sweep) Python: default and CI ceiling move to 3.14 (requires-python >=3.11,<3.15; matrix 3.11/3.14; regular GIL build - the free-threaded interpreter is deliberately not used). Measured: 3.14 alone is a wash for this workload (certify-sweep 233.8s on 3.13 vs 232.3s on 3.14; the time is numpy/LAPACK and tight float loops). Dependencies: numba 0.66 + llvmlite 0.48 added; numpy pinned <2.5 (numba's ceiling; 2.4.6 resolves - the previous lock already forked to 2.4.6 on 3.11 because numpy 2.5 dropped it). certify_sweep: the batched-LAPACK dual-vertex enumeration (profiled at ~99% of runtime: det+solve on ~24k small systems per call plus array assembly) is replaced by a fused numba kernel - lexicographic combination enumeration, partial-pivot LU with the identical |det| > 1e-10 screen, back substitution, and the identical 1e-9 feasibility slack. Measured on the same machine, sequentially, single runs: - certify-sweep: 233.8s -> 55.3s (4.2x) - full slow suite: 372s -> 192s (6:12 -> 3:12), 3/3 pass - archived transcript reproduced BYTE-FOR-BYTE by the jitted kernel (stock numpy 2.4.6 flips one cosmetic tie-break line; the jit agrees with the numpy-2.5.1-generated archive, so no regeneration was needed) - fast suite 17/17 on 3.14.4 and 3.11 from the same lock Paper Section 4 and Appendix B recharacterize the sweep implementation honestly; PDF regenerated on Typst 0.15.1 (double-compile deterministic). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two performance asks, measured honestly:
Python 3.14: now the default (
.python-version, CI matrix 3.11/3.14, workflows on 3.14;requires-python >=3.11,<3.15; regular GIL build). Verdict on speed: a wash for this workload — certify-sweep 233.8s (3.13.1) vs 232.3s (3.14.4); the runtime lives in numpy/LAPACK and tight float loops, not the interpreter.numba: the profile showed ~99% of certify-sweep inside
lp_value(batcheddet+solveover ~24k small systems per call, plus array assembly). Replaced with a fused@njitkernel replicating the exact semantics (lexicographic combination order,|det| > 1e-10screen,1e-9feasibility slack). Results:Cost: numpy pinned
<2.5(numba's ceiling → 2.4.6; the old lock already forked to 2.4.6 on 3.11). Amusing detail: stock numpy 2.4.6 flips one cosmetic tie-break line vs the archive, but the jitted LU agrees with the numpy-2.5.1-generated archive — so no output regeneration was needed at all.Paper §4/Appendix B updated to describe the jitted implementation; PDF regenerated (Typst 0.15.1, deterministic).
🤖 Generated with Claude Code