From owner-freebsd-hackers Fri Jul 30 15:56:17 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 9A63214DF6 for ; Fri, 30 Jul 1999 15:56:12 -0700 (PDT) (envelope-from vanderh@ecf.toronto.edu) Received: from localhost.nowhere (ppp18321.on.bellglobal.com [206.172.130.1]) by smtp13.bellglobal.com (8.8.5/8.8.5) with ESMTP id SAA26256; Fri, 30 Jul 1999 18:55:46 -0400 (EDT) Received: (from tim@localhost) by localhost.nowhere (8.9.3/8.9.1) id SAA67544; Fri, 30 Jul 1999 18:53:56 -0400 (EDT) (envelope-from tim) Date: Fri, 30 Jul 1999 18:53:56 -0400 From: Tim Vanderhoek To: Dag-Erling Smorgrav Cc: John-Mark Gurney , James Howard , "Daniel C. Sobral" , freebsd-hackers@FreeBSD.ORG Subject: Re: replacing grep(1) Message-ID: <19990730185356.A67407@mad> References: <19990729182229.E24296@mad> <19990729164533.36798@hydrogen.fircrest.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95i In-Reply-To: ; from Dag-Erling Smorgrav on Fri, Jul 30, 1999 at 03:27:20PM +0200 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Fri, Jul 30, 1999 at 03:27:20PM +0200, Dag-Erling Smorgrav wrote: > > > it was VERY simple to do... and attached is the patch... this uses the > > option REG_STARTEND to do what the copy was trying to do... all of the > > code to use REG_STARTEND was already there, it just needed to be enabled.. > > Funnily, I experience a near-doubling of running time with similar > patches. Strange... His patches made grep on my system much faster than the original 0.10 and almost as fast as GNU grep. b$ /usr/bin/time ./grep-10 -e printer longfile > /dev/null 1.16 real 0.97 user 0.19 sys b$ /usr/bin/time ./grep-10-jmg -e printer longfile > /dev/null 0.48 real 0.43 user 0.04 sys b$ /usr/bin/time grep -e printer longfile > /dev/null 0.28 real 0.09 user 0.18 sys This is one of the original Celerons, FWIW. Once-in-a-while that gives me performance numbers somewhat different from any other Intel. -- 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