bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bug#22357: grep -f not only huge memory usage, but also huge time co


From: Paul Eggert
Subject: Re: bug#22357: grep -f not only huge memory usage, but also huge time cost
Date: Mon, 12 Dec 2016 08:57:55 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1

On 12/12/2016 02:36 AM, Trevor Cordes wrote:
If a user bothered to
specify fgrep or -F then that user knows what they are doing!

Here I have to disagree, and to agree with Bruno. The user should not have to know what grep's algorithm is. grep should just work. It is not working now and we need to fix that, but we shouldn't fix things by asking users to know that 'grep -F' is "fast" and plain grep is "slow".

Instead, we should fix things so that grep -F and plain grep are both fast when given equivalent patterns. If the file foo contains no special characters, then 'grep -F -f foo' and 'grep -f foo' should run at about the same speed (fast in both cases of course :-).




reply via email to

[Prev in Thread] Current Thread [Next in Thread]