Lightweight Indexing for Small Strings
spin.atomicobject.com
spin.atomicobject.com
If that one byte does not match, the entire match has no chance of being longer than the current best (in this simple case).
I especially like the clear, easy-to-understand, well-written presentation along with links to prior art. Wouldn't it be nice if most academic papers were written like this?
I realized yesterday that it can also be used as the basis for a linear-time sorting algorithm: https://gist.github.com/silentbicycle/8389129
Benchmarking indicates that it's probably not competitive speed-wise compared to counting sort (of which it is a variant), but the implementation should be pretty easy to understand. It may be good for pedagogical purposes.