Thread (7 messages) flat view 7 messages, 5 authors, 2016-06-15

Re: [PATCH] grep: do not do external grep on skip-worktree entries

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2016-06-15 22:47:58


On Tue, 5 Jan 2010, Miles Bader wrote:
On Tue, Jan 5, 2010 at 12:54 AM, Linus Torvalds
[off-list ref] wrote:
quoted
And "perf record" followed by "perf report" on the internal one shows
that it's not even regexec() - we use strstr() for the trivial case:
Does strstr use e.g. boyer-moore?  I imagine grep does...
It doesn't matter. Since we do the line-by-line thing, the input is always 
so short that DFA vs NFA vs BM vs other-clever-search doesn't matter. 
There is no scaling - the grep buffer tends to be too small for the 
algorithm to matter.

And the reason we do things line-by-line is that we need to then output 
things line-per-line.

			Linus
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help