summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNorihiro Tanaka <noritnk@kcn.ne.jp>2016-12-28 06:29:39 (GMT)
committerPaul Eggert <eggert@cs.ucla.edu>2016-12-28 06:33:12 (GMT)
commitbb3d1acbea88ced0cf4a93baa4ee8f2862f9e1ac (patch)
tree9caa856a69bf64adfb1dac0c376525526a840bed
parenta6f8b7464eb0812621ce7bb1f20180502e779050 (diff)
downloadgrep-bb3d1acbea88ced0cf4a93baa4ee8f2862f9e1ac.zip
grep-bb3d1acbea88ced0cf4a93baa4ee8f2862f9e1ac.tar.gz
grep-bb3d1acbea88ced0cf4a93baa4ee8f2862f9e1ac.tar.bz2
grep: improve performance with multiple patterns
* src/grep.c (main): Avoid fgrep-to-grep conversion for word matching with multiple patterns in single byte locales.
-rw-r--r--src/grep.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/grep.c b/src/grep.c
index aebab20..ab47839 100644
--- a/src/grep.c
+++ b/src/grep.c
@@ -2862,7 +2862,7 @@ main (int argc, char **argv)
for -iF. */
if (matcher == F_MATCHER_INDEX
&& (! localeinfo.multibyte
- ? match_words
+ ? n_patterns == 1 && match_words
: (contains_encoding_error (keys, keycc)
|| (match_icase && !fgrep_icase_available (keys, keycc)))))
{