String Search Race Screensaver
The String Search Race screensaver runs real Knuth-Morris-Pratt and Boyer-Moore algorithms side by side, hunting for a pattern in the same live text. It is free, runs in your browser, and ESC exits.
How the String Search Race screensaver works
The saver picks a real short pattern and searches for it in a longer block of text using two real, distinct algorithms at once.
Knuth-Morris-Pratt uses a real precomputed failure table to skip ahead without ever re-checking characters it has already matched.
Boyer-Moore instead compares from the end of the pattern and uses real mismatch information to skip ahead by more than one character at a time.
Once both algorithms finish scanning the text, every real match found is highlighted, then a fresh pattern and text begin.
A worked example
Boyer-Moore often leaps several characters ahead after a mismatch near the end of the pattern, while KMP advances more steadily using its real failure-table skips — both still landing on the same true matches.
Settings & tips
- Accent recolours the pattern under comparison.
- Both algorithms are real, correct, unmodified implementations.
- A fresh pattern and text generate automatically once the scan finishes.
Frequently asked questions
- Are these real string-search algorithms?
- Yes — real Knuth-Morris-Pratt and Boyer-Moore implementations, each finding every true match in the text.
- Why does Boyer-Moore often finish faster?
- Its real mismatch-based skips can jump past several characters at once, while KMP advances more incrementally.
- Is a key needed?
- No — it is a pure local computation.
- Is it free?
- Yes — free, no download, in your browser.