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 <care...@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

Reply via email to