Earlier quoted context omitted.
String search algorithms can cleverly skip forward when they don't find a match. They can skip forward more for longer "needle" strings. That said grep is pretty fast period, so probably doesn't make a huge difference in practice, especially if you're IO-bound, which is common.
The caveat being if you're Unicode aware then many of the old skipahead strategies don't work as well and have to be rolled back or disabled.
But the skip-ahead stuff isn't the most important thing nowadays. The key is staying in the fast vectorized skip loop as long as possible.