From owner-freebsd-hackers Tue Jul 27 6:29:22 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from smtp11.bellglobal.com (smtp11.bellglobal.com [204.101.251.53]) by hub.freebsd.org (Postfix) with ESMTP id 326A81540C for ; Tue, 27 Jul 1999 06:29:17 -0700 (PDT) (envelope-from vanderh@ecf.toronto.edu) Received: from localhost.nowhere (ppp18416.on.bellglobal.com [206.172.130.96]) by smtp11.bellglobal.com (8.8.5/8.8.5) with ESMTP id JAA02668; Tue, 27 Jul 1999 09:32:34 -0400 (EDT) Received: (from tim@localhost) by localhost.nowhere (8.9.3/8.9.1) id JAA34765; Tue, 27 Jul 1999 09:29:42 -0400 (EDT) (envelope-from tim) Date: Tue, 27 Jul 1999 09:29:41 -0400 From: Tim Vanderhoek To: Dag-Erling Smorgrav Cc: hackers@freebsd.org Subject: Re: replacing grep(1) Message-ID: <19990727092941.A34599@mad> References: <19990727082344.B33399@mad> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95i In-Reply-To: <19990727082344.B33399@mad>; from Tim Vanderhoek on Tue, Jul 27, 1999 at 08:23:44AM -0400 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tue, Jul 27, 1999 at 08:23:44AM -0400, Tim Vanderhoek wrote: > > How's it compare in speed? [I'd test it myself, but see my private > email...] Okay, following-up on myself, and indirectly Sheldon, It does seem a little too slow. I'm not sure that this is because it doesn't use mmap. Supposedly the merged buffer/vm means mmap doesn't make as large a difference as it used to. On a file with 100000+ lines, the speed difference is rather restrictive. Looking over the gprof output, I think its authors (or some other intrepid hacker) will find ways to speed it up. Only about 10% of the time is spend in procline(). There seems to be a lot of unnecessary strncpy() that could be _easily_ avoided if free() on util.c:130 was avoided, but I'll let the authors speak first. :-) -- 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