GNU bug report logs - #31074
Grep -i is slow

Previous Next

Package: grep;

Reported by: Geoff Kuenning <geoff <at> cs.hmc.edu>

Date: Fri, 6 Apr 2018 05:33:02 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Geoff Kuenning <geoff <at> cs.hmc.edu>, 31074 <at> debbugs.gnu.org
Subject: bug#31074: Grep -i is slow
Date: Fri, 6 Apr 2018 12:35:30 -0700
It sounds like you've run into a bug that was fixed in grep 2.18 
(2014-02-20). Please try grep 3.1, the current version. If that doesn't 
work, it'd be helpful if you could give us a reproducible test case. 
Here's how I tried (and failed) to reproduce the problem on Fedora 27 
x86-64, which has grep 3.1:

$ shuf -i 1-20000000 >rawindex
$ ls -l rawindex
-rw-r--r--. 1 eggert eggert 168888897 Apr  6 12:30 rawindex
$ time grep outgoing.*harris.*dcraw rawindex

real    0m0.069s
user    0m0.013s
sys     0m0.055s
$ time grep -i outgoing.*harris.*dcraw rawindex

real    0m0.418s
user    0m0.368s
sys     0m0.048s
$ time grep 
'[Oo][Uu][Tt][Gg][Oo][Ii][Nn][Gg].*[Hh][Aa][Rr][Rr][Ii][Ss].*[Dd][Cc][Rr][Aa][Ww]' 
rawindex

real    0m0.416s
user    0m0.357s
sys     0m0.058s
$ locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=





This bug report was last modified 7 years and 102 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.