From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 25 11:53:02 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4AC4B37B401 for ; Wed, 25 Jun 2003 11:53:02 -0700 (PDT) Received: from mail.farley.org (adsl-67-64-95-201.dsl.austtx.swbell.net [67.64.95.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id C1B7F4400D for ; Wed, 25 Jun 2003 11:53:00 -0700 (PDT) (envelope-from sean-freebsd@farley.org) Received: from thor.farley.org (c8panxsswdj19gsp@thor.farley.org [IPv6:2002:4340:5fc9::5]) by mail.farley.org (8.12.9/8.12.9) with ESMTP id h5PIqxMp056508 for ; Wed, 25 Jun 2003 13:52:59 -0500 (CDT) (envelope-from sean-freebsd@farley.org) Received: from thor.farley.org (localhost [127.0.0.1]) by thor.farley.org (8.12.9/8.12.9) with ESMTP id h5PIqxPC073098 for ; Wed, 25 Jun 2003 13:52:59 -0500 (CDT) (envelope-from sean-freebsd@farley.org) Received: from localhost (sean@localhost)h5PIqxb7073095 for ; Wed, 25 Jun 2003 13:52:59 -0500 (CDT) (envelope-from sean-freebsd@farley.org) X-Authentication-Warning: thor.farley.org: sean owned process doing -bs Date: Wed, 25 Jun 2003 13:52:59 -0500 (CDT) From: Sean Farley X-X-Sender: sean@thor.farley.org To: freebsd-hackers@freebsd.org In-Reply-To: <20030625000344.A54424@smtp.k12us.com> Message-ID: <20030625132648.J72955@thor.farley.org> References: <20030621103502.K18572@thor.farley.org> <20030625000344.A54424@smtp.k12us.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: Replacing GNU grep revisited X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Jun 2003 18:53:02 -0000 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