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 :-).