Re:Why GNU grep is fast (2010)
by ahelwer on Thursday November 28, 2013 @02:11PM
(#6815965)
You would inspect characters multiple times only in a very naive implementation of Boyer-Moore. The Galil Rule[0] fixes this and is also required for proving linear worst-case runtime.
[0] https://en.wikipedia.org/wiki/Boyer%E2%80%93Moore_string_sea...