From: "Carlo Marcelo Arenas Belón" <carenas@gmail.com>
To: git@vger.kernel.org
Cc: frekui@gmail.com, michael.osipov@siemens.com,
ibrahim.vanak@hpe.com, matheus.bernardino@usp.br,
vleschuk@accesssoftek.com
Subject: [RFC PATCH 1/2] p7810: add more grep performance relevant cases
Date: Sun, 4 Aug 2019 14:15:08 -0700 [thread overview]
Message-ID: <20190804211509.39229-2-carenas@gmail.com> (raw)
In-Reply-To: <20190804211509.39229-1-carenas@gmail.com>
Add a baseline for a matching regex and make clear the distinction
between fixed (now using kwset) and a real simple expression.
Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
---
t/perf/p7810-grep.sh | 25 +++++++++++++++++++++++--
1 file changed, 23 insertions(+), 2 deletions(-)
diff --git a/t/perf/p7810-grep.sh b/t/perf/p7810-grep.sh
index 9f4ade639f..9a4e335659 100755
--- a/t/perf/p7810-grep.sh
+++ b/t/perf/p7810-grep.sh
@@ -7,13 +7,34 @@ test_description="git-grep performance in various modes"
test_perf_large_repo
test_checkout_worktree
-test_perf 'grep worktree, cheap regex' '
+test_perf 'grep worktree, fixed regex (no match)' '
git grep some_nonexistent_string || :
'
+test_perf 'grep worktree, fixed regex (common)' '
+ git grep void || :
+'
+test_perf 'grep -I, fixed non binary regex (common)' '
+ git grep -i void || :
+'
+test_perf 'grep -i, fixed caseless regex (common)' '
+ git grep -i void || :
+'
+test_perf 'grep --no-index, fixed regex (common)' '
+ git grep --no-index void || :
+'
+test_perf 'grep worktree, simple regex (common)' '
+ git grep "void|int" || :
+'
+test_perf 'grep -I, simple non binary regex (common)' '
+ git grep -I "void|int" || :
+'
+test_perf 'grep -i, simple caseless regex (common)' '
+ git grep -i "void|int" || :
+'
test_perf 'grep worktree, expensive regex' '
git grep "^.* *some_nonexistent_string$" || :
'
-test_perf 'grep --cached, cheap regex' '
+test_perf 'grep --cached, fixed regex' '
git grep --cached some_nonexistent_string || :
'
test_perf 'grep --cached, expensive regex' '
--
2.23.0.rc1
next prev parent reply other threads:[~2019-08-04 21:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-04 21:15 [RFC PATCH 0/2] grep: make threading smarter Carlo Marcelo Arenas Belón
2019-08-04 21:15 ` Carlo Marcelo Arenas Belón [this message]
2019-08-04 21:15 ` [RFC PATCH 2/2] grep: make default number of threads reflect runtime Carlo Marcelo Arenas Belón
2019-08-05 21:28 ` Junio C Hamano
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=20190804211509.39229-2-carenas@gmail.com \
--to=carenas@gmail.com \
--cc=frekui@gmail.com \
--cc=git@vger.kernel.org \
--cc=ibrahim.vanak@hpe.com \
--cc=matheus.bernardino@usp.br \
--cc=michael.osipov@siemens.com \
--cc=vleschuk@accesssoftek.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).