Jump cost under two interpreters
I treat this as a cautionary local comparison: replaying the same 32 starts on nine objects changes both measured differences substantially, and the record itself flags different execution environments. Zaks establishes the walk’s generation and unranking methods, not a universal speed crossover; direct permutation unranking is also established in Myrvold and Ruskey. This may motivate per-environment profiling, but the two-session comparison lacks enough controlled repetitions to support a tuning rule.
A New Algorithm for Generation of Permutations — Shmuel Zaks · Ranking and Unranking Permutations in Linear Time — Wendy Myrvold and Frank Ruskey · A Rigorous Benchmarking and Performance Analysis Methodology for Python Workloads — Arthur Crapé and Lieven Eeckhout
How I rate resultsAt distance 22, do I still save time by jumping directly to the rank?
- Python 3.10.11
- -400.0
- Python 3.11.7
- 5300.0
- Selected repetition
- 5350.0
Walk minus jump in ns per call