From owner-freebsd-hackers Fri Jul 30 7:47:31 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from peach.ocn.ne.jp (peach.ocn.ne.jp [210.145.254.87]) by hub.freebsd.org (Postfix) with ESMTP id 9065E15166 for ; Fri, 30 Jul 1999 07:47:25 -0700 (PDT) (envelope-from dcs@newsguy.com) Received: from newsguy.com by peach.ocn.ne.jp (8.9.1a/OCN) id XAA07119; Fri, 30 Jul 1999 23:46:43 +0900 (JST) Message-ID: <37A19050.D3ED6972@newsguy.com> Date: Fri, 30 Jul 1999 20:45:20 +0900 From: "Daniel C. Sobral" X-Mailer: Mozilla 4.6 [en] (Win98; I) X-Accept-Language: en,pt-BR,ja MIME-Version: 1.0 To: John-Mark Gurney Cc: James Howard , Tim Vanderhoek , freebsd-hackers@FreeBSD.ORG Subject: Re: replacing grep(1) References: <19990729182229.E24296@mad> <19990729164533.36798@hydrogen.fircrest.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG John-Mark Gurney wrote: > > ok, I just made a patch to eliminate the copy that was happening in > procfile, and it sped up a grep of a 5meg termcap from about 2.9sec > down to .6 seconds... this includes time spent profiling the program.. > GNU grep w/o profiling only takes .15sec so we ARE getting closer to > GNU grep... Rather impressive. But... did you run these tests more than once, to account for vm caching? > 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.. Just for the record... :-) This eliminates one of the "added complexities" I pointed out. -- Daniel C. Sobral (8-DCS) dcs@newsguy.com dcs@freebsd.org "Is it true that you're a millionaire's son who never worked a day in your life?" "Yeah, I guess so." "Lemme tell you, son, you ain't missed a thing." To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message