From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 23 06:25:57 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 BE0B637B401 for ; Mon, 23 Jun 2003 06:25:57 -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 BF99443F3F for ; Mon, 23 Jun 2003 06:25:56 -0700 (PDT) (envelope-from sean-freebsd@farley.org) Received: from thor.farley.org (etag9kjk25fdeb1m@thor.farley.org [IPv6:2002:4340:5fc9::5]) by mail.farley.org (8.12.9/8.12.9) with ESMTP id h5NDPuMp029531 for ; Mon, 23 Jun 2003 08:25:56 -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 h5NDPuPC044869 for ; Mon, 23 Jun 2003 08:25:56 -0500 (CDT) (envelope-from sean-freebsd@farley.org) Received: from localhost (sean@localhost)h5NDPtA3044866 for ; Mon, 23 Jun 2003 08:25:56 -0500 (CDT) (envelope-from sean-freebsd@farley.org) X-Authentication-Warning: thor.farley.org: sean owned process doing -bs Date: Mon, 23 Jun 2003 08:25:55 -0500 (CDT) From: Sean Farley X-X-Sender: sean@thor.farley.org To: freebsd-hackers@FreeBSD.ORG In-Reply-To: <20030623114005.GB12521@HAL9000.homeunix.com> Message-ID: <20030623080515.S43893@thor.farley.org> References: <20030621103502.K18572@thor.farley.org> <20030622005852.GB59673@HAL9000.homeunix.com> <20030623114005.GB12521@HAL9000.homeunix.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: Mon, 23 Jun 2003 13:25:58 -0000 On Mon, 23 Jun 2003, David Schultz wrote: > On Sun, Jun 22, 2003, Sean Farley wrote: > > On Sat, 21 Jun 2003, David Schultz wrote: > > > > 2. GNU's grep is using libgnuregex. The speed-up by dds@ would not > > be felt? > > I was referring to freegrep, which I thought used the native libregex. Yes, it does. I was just confused. > In any case, if freegrep solves problems that GNU grep has, has the > features people care about, is competitive in terms of performance, > and has no known major bugs, then I would have no objections to it. > As long as there are good technical reasons to switch, licensing > advantages and performance are the least critical issues in my mind. > We're not talking about a factor of 2, right? It varies. Simpler searches are handled within FreeGrep such as expressions with "^", "$" or ".". This is how GNU grep searches so quickly; it "cheats" before it falls-back to the regex library. More complex searches can hit the regex library and slow FreeGrep down. In those cases, the ones I have found, it is still below a factor of two difference. I usually do tests on /usr/src. I have seen FreeGrep take 1:10 while GNU's grep took 0:58. Interesting. I found that GNU's grep actually finds a match for "grep -ail freebsd /usr/ports/distfiles/*": /usr/ports/distfiles/ezm3 ezm3 is a directory with a filename that contains FreeBSD in it. Sean ----------------------- sean-freebsd@farley.org