Comparisons used, as a multiple of the floor, n = 256
Comparisons used, as a multiple of the floor, n = 256
The information-theoretic floor at n = 256 is 1,684 comparisons: a binary decision tree with 256! leaves cannot be shallower than that. The bar is what each algorithm averaged over 16 random inputs, divided by the floor. Merge sort comes within 2% of it; Selection sort uses 19 times as many.
Drawn at 690 × 400, wide on the page.
Everything above is what distance-to-floor returns with no arguments; the caption is the
generator's own, computed from the numbers in the drawing rather than written beside it.
6 essays call
distance-to-floor. The drawing above is what it returns with no arguments at all; every
call below passes it something, because a placement that passes nothing draws whichever
member of the family the generator happens to default to rather than the one its essay
argues about — which is what optcheck and figfill exist to catch.
Where it is called
Changing this generator changes every one of these figures.