Why it matters

Boyer-Moore is production string search. Sublinear in practice.

Advertisement

The architecture

Bad char heuristic.

Good suffix heuristic.

Skip aggressively.

Boyer-Moore string searchBad charshift tableGood suffixshift tableSkipaggressive skipsBoyer-Moore 1977; GNU grep uses variants; sublinear in practice
Boyer-Moore string search.
Advertisement

How it works end to end

Boyer-Moore 1977.

GNU grep uses.

Sublinear practical.