Generator

Scan every time, or build the index once

Rendered here at the parameters it defaults to, with every essay that calls it — which is the same list as the blast radius of changing it.
Scan every time, or build the index onceA text of 4,096 characters over 4 symbols. Building the suffix array by prefix doubling and its LCP array by Kasai's method costs 8,188 character comparisons and 85,248 integer comparisons, paid once. After that a query costs 89 characters against a scan's 1739. The lines cross at 5 queries, which is the whole of the decision.11010010⁴10⁵queries answeredcharacter comparisons, cumulative5 queriesScan each timeIndex, then queryone unit = one character comparison · 4 doubling roundsbreak-even at 5 queries

Scan every time, or build the index once

A text of 4,096 characters over 4 symbols. Building the suffix array by prefix doubling and its LCP array by Kasai's method costs 8,188 character comparisons and 85,248 integer comparisons, paid once. After that a query costs 89 characters against a scan's 1739. The lines cross at 5 queries, which is the whole of the decision.

Drawn at 700 × 430, wide on the page. Everything above is what suffix-index returns with no arguments; the caption is the generator's own, computed from the numbers in the drawing rather than written beside it.

3 essays call suffix-index. 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.

The library, page 5 of 5 — where suffix-index sits