Compare NUMBERS, not strings. Hash each window; a rolling hash updates it in O(1) per slide.
H' = ((H − s[i]·Bᵐ⁻¹)·B + s[i+m]) mod M — three ops, O(1)Green = char that just entered · red = char that just left (toy modulus 101). 'abc' hashes to 22; window hits 22 → verify → match at 5.
Check each window's hash against a SET of k pattern hashes. 800 patterns: 200× faster than KMP×800.
Randomization + hashing buy CAPABILITIES: fingerprint, dedup, batch-compare. The rolling hash outgrew the algorithm — rsync, backup chunking, plagiarism, git. Next: Boyer-Moore — scan right-to-left, skip forward, read fewer than n chars.