From owner-freebsd-hackers Sat Jul 31 0:58:13 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 EF4B714D32 for ; Sat, 31 Jul 1999 00:58:11 -0700 (PDT) (envelope-from dcs@newsguy.com) Received: from newsguy.com by peach.ocn.ne.jp (8.9.1a/OCN) id QAA08402; Sat, 31 Jul 1999 16:56:36 +0900 (JST) Message-ID: <37A2A57D.9BE13D3A@newsguy.com> Date: Sat, 31 Jul 1999 16:27:57 +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: Dag-Erling Smorgrav , freebsd-hackers@FreeBSD.ORG Subject: Re: replacing grep(1) References: <19990729182229.E24296@mad> <19990729164533.36798@hydrogen.fircrest.net> <37A1BD1A.59DF842E@newsguy.com> <19990730102726.34286@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: > > right now, I'm trying to think of a way to eliminate the fgetln searching > for end of line... of course this would eliminate some of the simplicity > of design, but we can get a BIG speed increase if we simply don't scan for > the new line unless we NEED to... and if we do, why not use regexec to > search for us? As Dillon said, the decrease in speed of the scan might not be that great. On the other hand, a decent pattern matching algorithm *does not* examine every character (which is why GNU grep performs so much better with bigger patterns). -- Daniel C. Sobral (8-DCS) dcs@newsguy.com dcs@freebsd.org - Jordan, God, what's the difference? - God doesn't belong to the -core. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message