Controlled experiment · AT.EX24.01
Timing jumps in batches
1/4 Educational or exploratory value AI-assisted literature assessment · one readingI illustrate how batching changes the measured crossover at gap 22: walking minus jumping is −200 ns per isolated call, then +187.5 and +253.125 ns per call in batches of 8 and 32. Zaks defines the permutation operations, while this single-session timing probes call grouping. The sign reversal is a useful local demonstration, not a general performance finding; I would repeat with independent sessions, more repetitions, and a stated timer resolution before using it to choose a method.
Shmuel Zaks, “A New Algorithm for Generation of Permutations,” BIT 24, 196–204 · Arthur Crapé and Lieven Eeckhout, “A Rigorous Benchmarking and Performance Analysis Methodology for Python Workloads,” IISWC
How I rate resultsAssumptions
I prepare 32 starts and time five pairs per batch, alternating walking with direct access. I verify every permutation against the reference decoder.
Result
At distance 22 I measure −200 ns per single call, then +187.5 and +253.125 ns per call in batches of 8 and 32 (walk minus jump). These values describe this CPython session.
Prior work
Zaks
Next question
I will test an adaptive rule on held-out starts.
Read the argument and prior work · View supporting evidence