On Thu, 2017-10-26 at 17:11 +0200, Han-Wen Nienhuys wrote:
> On Thu, Oct 26, 2017 at 5:02 PM, Joe Perches <[email protected]> wrote:
> > Comparing a cache warm git grep vs command line grep
> > shows significant differences in cpu & wall clock.
> >
> > Any ideas how to improve this?
>
> Is git-grep multithreaded?
Yes, at least according to the documentation
$ git grep --help
[]
grep.threads
Number of grep worker threads to use. If unset (or set to 0), 8
threads are used by default (for now).
> IIRC, grep -r uses multiple threads. (Do
> you have a 4-core machine?)
I have a 2 core machine with hyperthreading
$ cat /proc/cpuinfo
[]
model name : Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz
stepping : 3
microcode : 0xba
cpu MHz : 2400.000
cache size : 3072 KB
physical id : 0
siblings : 4
core id : 0
cpu cores : 2