From: Joe Perches <joe@perches.com>
To: Han-Wen Nienhuys <hanwen@google.com>
Cc: git <git@vger.kernel.org>
Subject: Re: grep vs git grep performance?
Date: Thu, 26 Oct 2017 08:55:21 -0700 [thread overview]
Message-ID: <1509033321.11245.3.camel@perches.com> (raw)
In-Reply-To: <CAFQ2z_P9bpw+Pc2DhJTCB8dxj-5JAKLE=nyvToGuiRA8wV66Wg@mail.gmail.com>
On Thu, 2017-10-26 at 17:11 +0200, Han-Wen Nienhuys wrote:
> On Thu, Oct 26, 2017 at 5:02 PM, Joe Perches <joe@perches.com> 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
next prev parent reply other threads:[~2017-10-26 15:55 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-26 15:02 grep vs git grep performance? Joe Perches
2017-10-26 15:11 ` Han-Wen Nienhuys
2017-10-26 15:55 ` Joe Perches [this message]
2017-10-26 16:13 ` SZEDER Gábor
2017-10-26 16:20 ` Joe Perches
2017-10-26 16:58 ` Stefan Beller
2017-10-26 17:41 ` Joe Perches
2017-10-26 17:45 ` Stefan Beller
2017-10-27 17:22 ` Joe Perches
2017-10-27 22:11 ` Ævar Arnfjörð Bjarmason
2017-10-27 23:22 ` Joe Perches
2017-10-28 7:45 ` Ævar Arnfjörð Bjarmason
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1509033321.11245.3.camel@perches.com \
--to=joe@perches.com \
--cc=git@vger.kernel.org \
--cc=hanwen@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).