Thread (5 messages) flat view 5 messages, 2 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:48:00


On Mon, 11 Jan 2010, Fredrik Kuivinen wrote:
Any ideas on how this can be explained?
Could it be a bad 'strstr()' implementation? 

Try a complex pattern ("qwerty.*as" finds the same line), and see if that 
too is slower than before. If that is faster than it used to be (with 
--no-ext-grep, of course), then it's strstr() that is badly implemented.

For me, on x86-64 (Fedora-12), strstr() seems to do pretty well. But it's 
easy to do a stupid implementation of strstr that does a 'strlen()' first, 
for example, and thus always traverses all data _twice_ etc. Depending on 
cache sizes etc, that can end up killing performance (or not mattering 
much at all..)

		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