>From 545bd506efcd6cab4f28c07a438868f14b7dc1d2 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 23 Sep 2020 10:52:12 -0700 Subject: [PATCH 1/5] grep: fix recently-introduced performance glitch * src/grep.c (main): Do not double-increment update_patterns. update_patterns increments n_patterns now; do not increment it again, as the incorrect count would hurt performance heuristics later. --- src/grep.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/grep.c b/src/grep.c index 1453b14..11856d8 100644 --- a/src/grep.c +++ b/src/grep.c @@ -2881,7 +2881,6 @@ main (int argc, char **argv) ptrdiff_t patlen = strlen (keys); keys[patlen] = '\n'; keycc = update_patterns (keys, 0, patlen + 1, ""); - n_patterns++; } else usage (EXIT_TROUBLE); -- 2.17.1