On Sat, 5 Dec 2020 10:06:27 -0800 Jim Meyering <j...@meyering.net> 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