bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: grep 2.4.2 takes forever with -v -f


From: Stepan Kasal
Subject: Re: grep 2.4.2 takes forever with -v -f
Date: Fri, 1 Oct 2004 10:03:29 +0200
User-agent: Mutt/1.4.1i

Hello,
        regarding the bug report below, I'd also like to see more detailed
info. Version 2.4.2 is rather old, so upgrading is the first thing which
comes to mind.

Stepan Kasal, the maintainer of GNU grep

> Hi There,
> 
> When I use:
> 
>      egrep -v -f out words > left
> 
> where out contains
> 
>      r.....|.e....|..l...|...i..|....e.|.....f
>      u.....|.n....|..d...|...o..|....n.|.....e
>   ... 
>      s.....|.o....|..r...|...t..|....e.|.....d
> 
> the program takes up about 15% of the CPU and takes
> so long that I have never been patient enough to let
> it finish. 
> 
> When I use DeMorgan's ~(a | b | c) = ~a & ~b & ~c rule I get the
> equivalent command sequence:
> 
>      egrep -v "r.....|.e....|..l...|...i..|....e.|.....f" words >#1
>      egrep -v "u.....|.n....|..d...|...o..|....n.|.....e" #1 > #2
>   ... 
>      egrep -v "s.....|.o....|..r...|...t..|....e.|.....d" #n > left
> 
> and the search is pretty much instantaneous. 
> 
> At first I thought the first version was reading the entire words
> file for each line in out, but it takes way too much time even for
> that. 
> 
>   --  p.r.p


> SECURITY: NON-DISCLOSURE USE ONLY

Nonsense.
The message is now publicly archived.




reply via email to

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