Date: Wed, 25 Jun 2003 13:52:59 -0500 (CDT) From: Sean Farley <sean-freebsd@farley.org> To: freebsd-hackers@freebsd.org Subject: Re: Replacing GNU grep revisited Message-ID: <20030625132648.J72955@thor.farley.org> In-Reply-To: <20030625000344.A54424@smtp.k12us.com> References: <20030621103502.K18572@thor.farley.org> <20030625000344.A54424@smtp.k12us.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 25 Jun 2003, Christopher Weimann wrote: > There is at least one aspect of freegrep that doesn't even come > close to GNU grep, fgrep. I just added fgrep handling. It better be slower. :) At least it will now try a faster method on the patterns before hitting the regex library. It is still slow. > I ran both of these more than once so it is not a fluke. After > looking at it further it seems that freegrep does not use the > Aho-Corasick algorithim for fgrep but just uses brute force. Yes, it uses brute force. I am considering either Aho-Corasick, Commentz-Walter (used in GNU fgrep) or the Boyer-Moore variation used in Glimpse and an older agrep. The last algorithm is supposedly the fastest, but I do not know if these algorithms are patent-free or not. > I wonder how many of the other old utils outrun our modern ones. > I guess it must be all those gotos. :) Better than a lot of gosubs. :) Sean ----------------------- sean-freebsd@farley.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030625132648.J72955>