pub struct Tuning {
pub iterations: u32,
pub leaf: u32,
pub threads: usize,
}Expand description
The knobs, all three of them.
The defaults are the paper’s, and both of the first two buy less than they look like they should: doubling the iteration cap is worth hundredths of a bit an edge because the swap loop stops early on almost every split, and halving the leaf is worth about as much because sixteen ids in a group of five hundred and twelve are already adjacent.
Fields§
§iterations: u32How many swap rounds one split gets before it moves on.
A round that swaps nothing ends the split early, which is what usually happens well before this, so the cap is a bound on the worst case rather than a target.
leaf: u32The smallest partition worth splitting.
threads: usizeHow many threads the recursion may spread over.
One by default, because a numbering that depends on how many cores the machine had would be a numbering nobody can reproduce. This one does not: the split of a partition is decided before either half is recursed into, so the halves are independent and the answer is the same at any thread count. The cost of a thread is one scratch set, which is eight bytes a node.