From owner-freebsd-hackers Thu Jul 29 16: 7: 1 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from po3.wam.umd.edu (po3.wam.umd.edu [128.8.10.165]) by hub.freebsd.org (Postfix) with ESMTP id 73D6E14DBC for ; Thu, 29 Jul 1999 16:06:47 -0700 (PDT) (envelope-from howardjp@wam.umd.edu) Received: from rac9.wam.umd.edu (root@rac9.wam.umd.edu [128.8.10.149]) by po3.wam.umd.edu (8.9.3/8.9.3) with ESMTP id TAA11767; Thu, 29 Jul 1999 19:05:58 -0400 (EDT) Received: from rac9.wam.umd.edu (sendmail@localhost [127.0.0.1]) by rac9.wam.umd.edu (8.9.3/8.9.3) with SMTP id TAA12613; Thu, 29 Jul 1999 19:05:57 -0400 (EDT) Received: from localhost by rac9.wam.umd.edu (8.9.3/8.9.3) with ESMTP id TAA12609; Thu, 29 Jul 1999 19:05:57 -0400 (EDT) X-Authentication-Warning: rac9.wam.umd.edu: howardjp owned process doing -bs Date: Thu, 29 Jul 1999 19:05:57 -0400 (EDT) From: James Howard To: Tim Vanderhoek Cc: "Daniel C. Sobral" , freebsd-hackers@FreeBSD.ORG Subject: Re: replacing grep(1) In-Reply-To: <19990729182229.E24296@mad> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thu, 29 Jul 1999, Tim Vanderhoek wrote: > fgetln() does a complete copy of the line buffer whenever an > excessively long line is found. On this point, it's hard to do better > without using mmap(), but mmap() has its own disadvantages. My last > suggestion to James was to assume a worst case for long lines and mark > the worst worst case with an XXX "this is unfortunate". DES tells me he has a new version (0.10) which mmap()s. It supposedly cuts the run time down significantly, I do not have the numbers in front of me. Unfortunetly he has not posted this version yet so I cannot download it and run it myself. He also says that if mmap fails, he drops back to stdio. This should only happen in the NFS case, the > 2G case, etc. > [Never mind that it should be spending near 100% of its time in > procline...that just means he's still got work to do... :-] I'd rather see it spending 100% of its time in regexec(), then I can just blame Henry Spencer :) Someone said there was new regex code out, is this true? Can anyone with a copy test grep with it? Jamie To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message