From: Julia Lawall <julia.lawall@inria.fr>
To: Markus Elfring <Markus.Elfring@web.de>
Cc: Julia Lawall <julia.lawall@inria.fr>,
Coccinelle <cocci@systeme.lip6.fr>,
Gilles Muller <Gilles.Muller@lip6.fr>,
Julia Lawall <Julia.Lawall@lip6.fr>,
Masahiro Yamada <masahiroy@kernel.org>,
Michal Marek <michal.lkml@markovi.net>,
Nicolas Palix <nicolas.palix@imag.fr>,
Sumera Priyadarsini <sylphrenadin@gmail.com>,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
Denis Efremov <efremov@linux.com>
Subject: Re: Coccinelle: Checking the influence of “Grep query”
Date: Wed, 28 Oct 2020 07:50:22 +0100 (CET) [thread overview]
Message-ID: <alpine.DEB.2.22.394.2010280748440.2766@hadrien> (raw)
In-Reply-To: <6fe4c63d-1b7e-b947-139c-423edc519d2f@web.de>
[-- Attachment #1: Type: text/plain, Size: 2005 bytes --]
On Tue, 27 Oct 2020, Markus Elfring wrote:
> > It doesn't matter. The purpose is just to select files that are relevent
> > for consideration. If a file is selected for two reasons instead of one
> > reason, it doesn't matter; it's still selected.
>
> The software “git grep” probably supports also short-circuit evaluation
> for the discussed use case (because command parameters were selected in the way
> that this special functionality would not be excluded).
> https://github.com/git/git/blob/e8ab941b671da6890181aea5b5755d1d9eea24ec/grep.c#L1294
>
> Under which circumstances would potentially measurable effects become more interesting
> so that the reordering of the mentioned identifiers would be reconsidered?
>
>
> elfring@Sonne:~/Projekte/Linux/next-patched> /usr/bin/time git grep --threads 4 -l -w -e 'for_each_node_by_type' -e 'for_each_matching_node_and_match' -e 'for_each_compatible_node' -e 'for_each_available_child_of_node' -e 'for_each_child_of_node' -e 'for_each_matching_node' -e 'for_each_node_by_name' -e 'for_each_node_with_property' -- '*.[ch]' > /dev/null
> 1.55user 0.74system 0:01.24elapsed 183%CPU (0avgtext+0avgdata 78760maxresident)k
> 216inputs+0outputs (3major+30006minor)pagefaults 0swaps
> elfring@Sonne:~/Projekte/Linux/next-patched> /usr/bin/time git grep --threads 4 -l -w -e 'for_each_child_of_node' -e 'for_each_available_child_of_node' -e 'for_each_compatible_node' -e 'for_each_node_by_name' -e 'for_each_node_by_type' -e 'for_each_matching_node' -e 'for_each_matching_node_and_match' -e 'for_each_node_with_property' -- '*.[ch]' > /dev/null
> 1.55user 0.72system 0:01.24elapsed 183%CPU (0avgtext+0avgdata 74380maxresident)k
> 0inputs+0outputs (0major+31030minor)pagefaults 0swaps
As far as I can see, you are showing that the times are the same. Why are
you wasting your time on this?
Although I didn't know that git grep was parallelizable, although since
the used time and the elapsed time are almost the same, maybe it doesn't
help much.
julia
next prev parent reply other threads:[~2020-10-28 21:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <78f8b08754dde286adf7e11e1eeb3bb8ad500d8b.camel@web.de>
[not found] ` <acaed49b9195d47e252a0b67551f87e96324d004.camel@web.de>
2020-10-22 12:35 ` Julia Lawall
[not found] ` <6fe4c63d-1b7e-b947-139c-423edc519d2f@web.de>
2020-10-28 6:50 ` Julia Lawall [this message]
[not found] ` <45310257-201a-40ea-348f-b8e909c3775c@web.de>
2020-10-27 10:55 ` [Cocci] Coccinelle: Checking the relevance of parentheses in “git grep” Julia Lawall
[not found] ` <bfb3e786-a64f-ecaf-eb37-8bd6b53cf38a@web.de>
2020-10-27 12:03 ` Julia Lawall
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.2.22.394.2010280748440.2766@hadrien \
--to=julia.lawall@inria.fr \
--cc=Gilles.Muller@lip6.fr \
--cc=Julia.Lawall@lip6.fr \
--cc=Markus.Elfring@web.de \
--cc=cocci@systeme.lip6.fr \
--cc=efremov@linux.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=michal.lkml@markovi.net \
--cc=nicolas.palix@imag.fr \
--cc=sylphrenadin@gmail.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®