GNU bug report logs - #22239
fgrep -i slow in 2.21

Previous Next

Package: grep;

Reported by: Ondřej Cífka <ondra <at> cifka.com>

Date: Fri, 25 Dec 2015 22:46:02 UTC

Severity: normal

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

Bug is archived. No further changes may be made.

Full log


Message #13 received at 22239 <at> debbugs.gnu.org (full text, mbox):

From: Ondřej Cífka <ondra <at> cifka.com>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: 22239 <at> debbugs.gnu.org
Subject: Re: fgrep -i slow in 2.21
Date: Mon, 11 Apr 2016 09:14:40 +0200
You're probably right about the locale. I'm using cs_CZ.UTF-8. With
LC_ALL=C, both variants run faster and the difference is
insignificant.

With cs_CZ.UTF-8, on my machine, your test case takes 2.322s with -i
and 0.464s without -i.

I tested on my Aspell dictionary dump, where the difference is more noticeable:

aspell dump master | head -n 100000 >list.txt

grep 2.21 with -i: 7.336s
grep 2.21 without -i: 0.312s
grep 2.16 with -i: 0.372s
grep 2.16 without -i: 0.431s

With LC_ALL=C, both versions are about as fast.

On Mon, Apr 11, 2016 at 7:02 AM, Paul Eggert <eggert <at> cs.ucla.edu> wrote:
> This is following up on:
>
> http://bugs.gnu.org/22239
>
> Could you please supply some specific test cases to illustrate the problem?
> I'm not seeing it, but this could be because I'm not using your locale, or
> am using machine-generated patterns. I am using master grep in the C locale
> on Ubuntu 15.10, with a pattern file generated like this:
>
> seq -f 'pattern %g' 100000 >list.txt
>
> and running commands like this in the 'grep' source directory:
>
> src/grep -F -i -f list.txt $(git ls-files | grep -v gnulib)
>
> (or the same command without -i).




This bug report was last modified 8 years and 185 days ago.

Previous Next


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