2 ms·
Um, like, it is: http://lists.freebsd.org/pipermail/freebsd-current/2010-August/019310.html http://lists.freebsd.org/pipermail/freebsd-current/2010-Augu... st
by akavel 12y ago
Um, like, it is:
http://lists.freebsd.org/pipermail/freebsd-current/2010-August/019310.html http://lists.freebsd.org/pipermail/freebsd-current/2010-Augu...
still, see also:
http://ridiculousfish.com/blog/posts/old-age-and-treachery.html http://ridiculousfish.com/blog/posts/old-age-and-treachery.h...
- curiousDog 12y agoI have seen those and those were what I was implicitly referring to. And if you did read them,"- Don't look for newlines in the input until after you've found a match." is just one of them but not the major contributor for speed. It's Boyer-Moore.
- akavel 12y agoHm, there seems to be written like so there: > Moreover, GNU grep AVOIDS BREAKING THE INPUT INTO LINES. Looking for newlines would slow grep down by a factor of several times, because to find the newlines it would have to look at every byte! (italics added, but uppercase original!) On my reading this sounds quite huge; I seem to understand the gist is that it's still a significant gain after Boyer-Moore. But, whatever.