Recently I encountered a problem of finding pattern in stream of bytes. Using Wikipedia article I implemented much of the Boyer-Moore algorithm and converted it to more general solution, that can be used on any
T must implement
I did some simple benchmark and it looks surprising well - for small strings my implementation is slower than built-in
String.IndexOf but it can be almost 10 times faster for larger strings (> 1 kB).
Take a look at it at GitHub: https://github.com/mandrek44/Mandro.Utils/blob/master/Mandro.Utils/EnumerableExtensions.cs