Choosing a growth factor is choosing where to lose
Choosing a growth factor is choosing where to lose
Each point is a growth factor, appending 20,000 elements. Rightwards is more memory left unused when the sequence ends; upwards is more copying per append. Growing by ×1.125 wastes almost nothing and costs 9.89 units per append; growing by ×4 costs 2.09 and leaves 69% of the allocation empty. No point is below and left of every other, which is the definition of a trade-off and the reason real implementations disagree about this number.
Drawn at 670 × 380, wide on the page.
Everything above is what growth-tradeoff returns with no arguments; the caption is the
generator's own, computed from the numbers in the drawing rather than written beside it.
2 essays call
growth-tradeoff. 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.