pub fn budget(n: usize) -> u32
The run budget for n ticks: min(5, ceil(log2(n + 1)) + 1).
n
min(5, ceil(log2(n + 1)) + 1)