Re: Replacing GNU grep revisited

2003-06-26 Thread Christopher Weimann
On Wed 06/25/2003-11:43:50PM -0700, David Schultz wrote: > > The only good string matching algorithm I actually understand is > KMP, but really smart people tell me Boyer-Moore is the fastest in > the average case. It *can* be worse than KMP, depending on the > input, but for nearly all inputs it

Re: Replacing GNU grep revisited

2003-06-25 Thread David Schultz
On Wed, Jun 25, 2003, Sean Farley wrote: > 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 t

Re: Replacing GNU grep revisited

2003-06-25 Thread Sean Farley
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 st

Re: Replacing GNU grep revisited

2003-06-25 Thread Christopher Weimann
On Sat 06/21/2003-10:55:59AM -0500, Sean Farley wrote: > > I have placed the patches up on Geocities¹ for others to try out. They > get freegrep fairly close to the performance of GNU's grep. Also > included is a small patch to regex to squeak a bit more performance out > of it, but I am not cer

Re: Replacing GNU grep revisited

2003-06-23 Thread Anthony Schneider
> 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. the * will expand /usr/ports/distfiles/* into full path names to each file in /usr/p

Re: Replacing GNU grep revisited

2003-06-23 Thread Sean Farley
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.

Re: Replacing GNU grep revisited

2003-06-23 Thread Sean Farley
On Sun, 22 Jun 2003, Ted Unangst wrote: > your handling of -i at least is incorrect. after patching, i get very > wrong results. results vary depending on length of string. OK. I am a dimwit. :) That was an older patch I had made. The site now has the later version. Sean --

Re: Replacing GNU grep revisited

2003-06-23 Thread David Schultz
On Sun, Jun 22, 2003, Sean Farley wrote: > On Sat, 21 Jun 2003, David Schultz wrote: > > > dds@ has expressed some interest in compiling the FSMs for regexps > > into native code, which would make it blazingly fast. See [EMAIL PROTECTED] > > As a practical matter, there are only a couple of zealo

Re: Replacing GNU grep revisited

2003-06-23 Thread Chris Costello
On Sunday, June 22, 2003, Sean Farley wrote: > Reasons to consider for switching: > 1. GNU's grep -r option "is broken" according to the following post. >The only thing I have noticed is that FreeGrep has more options for >controlling how symbolic links are traversed. > > http://groups.

Re: Replacing GNU grep revisited

2003-06-22 Thread Ted Unangst
your handling of -i at least is incorrect. after patching, i get very wrong results. results vary depending on length of string. reuelos:/tmp/grep-0.16> ./grep -i fastgrep * grep.c:fastgrep_t *fg_pattern; reuelos:/tmp/grep-0.16> ./grep fastgrep * grep.c:fastgrep_t *fg_pattern; grep.

Re: Replacing GNU grep revisited

2003-06-22 Thread Christian Weisgerber
Sean Farley <[EMAIL PROTECTED]> wrote: > Reasons to consider for switching: For whatever little it's worth, OpenBSD just switched to freegrep (a somewhat modified version from NetBSD). They also dumped the GNU gzip implementation, after extending compress to substitute as /usr/bin/gzip. -- Chr

Re: Replacing GNU grep revisited

2003-06-22 Thread Sean Farley
On Sun, 22 Jun 2003, Dag-Erling Smørgrav wrote: > Unfortunately, FreeGrep has annoying bugs as well. For instance, it > tries to grep the directories themselves (rather than just their > contents) when recursing, while GNU grep only greps directories if > they are explicitly listed on the command

Re: Replacing GNU grep revisited

2003-06-22 Thread Dag-Erling Smørgrav
Sean Farley <[EMAIL PROTECTED]> writes: > Reasons to consider for switching: > 1. GNU's grep -r option "is broken" according to the following post. That reason alone is enough for me, as I regularly run into this problem when grepping the kernel tree ("recursive directory loop" due to back-pointin

Re: Replacing GNU grep revisited

2003-06-22 Thread Sean Farley
On Sat, 21 Jun 2003, David Schultz wrote: > dds@ has expressed some interest in compiling the FSMs for regexps > into native code, which would make it blazingly fast. See [EMAIL PROTECTED] > As a practical matter, there are only a couple of zealots who care > what kind of license grep is under, s

Re: Replacing GNU grep revisited

2003-06-21 Thread David Schultz
On Sat, Jun 21, 2003, Sean Farley wrote: > In January, Pedro Giffuni started a thread about replacing GNU's grep in > the system. Interestingly, I did not know about the grep thread on > hackers until later. James Howard had interjected in February with > mention that he had gotten patches to spe

Replacing GNU grep revisited

2003-06-21 Thread Sean Farley
In January, Pedro Giffuni started a thread about replacing GNU's grep in the system. Interestingly, I did not know about the grep thread on hackers until later. James Howard had interjected in February with mention that he had gotten patches to speed up freegrep. I had sent him those patches in