Subject: Re: fgrep -i slow in 2.21

From: Ondřej Cífka <[email-masked]>
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 <[email-masked]> 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).