Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Jun 2003 08:25:55 -0500 (CDT)
From:      Sean Farley <sean-freebsd@farley.org>
To:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: Replacing GNU grep revisited
Message-ID:  <20030623080515.S43893@thor.farley.org>
In-Reply-To: <20030623114005.GB12521@HAL9000.homeunix.com>
References:  <20030621103502.K18572@thor.farley.org> <20030622005852.GB59673@HAL9000.homeunix.com> <20030623114005.GB12521@HAL9000.homeunix.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030623080515.S43893>