From owner-freebsd-hackers Sat Jul 31 16:42:39 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from smtp13.bellglobal.com (smtp13.bellglobal.com [204.101.251.52]) by hub.freebsd.org (Postfix) with ESMTP id 9469714E25 for ; Sat, 31 Jul 1999 16:42:33 -0700 (PDT) (envelope-from vanderh@ecf.toronto.edu) Received: from localhost.nowhere (ppp18415.on.bellglobal.com [206.172.130.95]) by smtp13.bellglobal.com (8.8.5/8.8.5) with ESMTP id TAA09196; Sat, 31 Jul 1999 19:40:49 -0400 (EDT) Received: (from tim@localhost) by localhost.nowhere (8.9.3/8.9.1) id TAA02604; Sat, 31 Jul 1999 19:39:30 -0400 (EDT) (envelope-from tim) Date: Sat, 31 Jul 1999 19:39:30 -0400 From: Tim Vanderhoek To: Sheldon Hearn Cc: Dag-Erling Smorgrav , John-Mark Gurney , James Howard , "Daniel C. Sobral" , freebsd-hackers@FreeBSD.ORG Subject: Re: replacing grep(1) Message-ID: <19990731193930.B2466@mad> References: <19990730220726.A69246@mad> <70182.933458176@axl.noc.iafrica.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95i In-Reply-To: <70182.933458176@axl.noc.iafrica.com>; from Sheldon Hearn on Sat, Jul 31, 1999 at 11:56:16PM +0200 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sat, Jul 31, 1999 at 11:56:16PM +0200, Sheldon Hearn wrote: > > > b$ time ./grep -E '(vt100)|(printer)' longfile > /dev/null > > b$ time grep '(vt100)|(printer)' longfile > /dev/null > > You think that's fair? Surely you can't expect Jamie's extended regex > support to outperform GNU's simple regex support? :-) GNU has no simple regex support. Actually, neither did Jamie's by the time I did that test, but I added the -E flag to make it obvious what was going on. :) I rather hope that the rumoured newer version of H. Spencer's regex lib is faster... Being as slow for that pattern as it is has got to be a bug of some sort... It's actually faster to scan the file twice, once for the first string and then for the second. -- This is my .signature which gets appended to the end of my messages. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message