Subject: Re: bug#44754: Extreme performance degradation in GNU grep 3.4 / 3.6

From: Norihiro Tanaka <[email-masked]>
Date: Mon, 07 Dec 2020 16:37:51 +0900

On Sat, 5 Dec 2020 10:06:27 -0800
Jim Meyering <[email-masked]> wrote:

> Thank you for that patch. Can you say a little more about the domain
> of the problem?
> I.e., is it specific to invocations with "-w"?
> Can you provide an example that exhibits the performance improvement,
> with timings?

The test case shown by Frank speeds-up about 10x.  That is a little
slower than grep 3.3.

Before:
$ env LC_ALL=C time -p src/grep -Fwif <(seq 300000 | tr 0-9 A-J) <<<foo
real 4.91
user 4.41
sys 0.30

After:
$ env LC_ALL=C time -p src/grep -Fwif <(seq 300000 | tr 0-9 A-J) <<<foo
real 0.37
user 0.16
sys 0.01