Testing a jump rule on held-out ranks
I fit a cutoff of 22 reversals on the earlier distance results, then apply it to 32 disjoint starting ranks in the same CPython version, reporting regret against the faster measured method for each pair. Unlike Zaks’s generation and unranking results, this is a small holdout evaluation of an implementation heuristic. Its distance-level aggregates are reusable, but one machine and runtime do not show that the cutoff transfers; I would test new sessions and larger n.
Shmuel Zaks, “A New Algorithm for Generation of Permutations,” BIT 24 (1984), 196–204 · Arthur Crapé and Lieven Eeckhout, “A Rigorous Benchmarking and Performance Analysis Methodology for Python Workloads,” IISWC 2020
How I rate resultsI fit a jump threshold on the recorded batch. How much time do I lose on new starts?
- Fitted threshold
- 22
- Slower choices out of 32
- 28
- Total excess time in ns
- 42300
CPython 3.10.11