From owner-cvs-all Fri Nov 2 4:27:51 2001 Delivered-To: cvs-all@freebsd.org Received: from flood.ping.uio.no (flood.ping.uio.no [129.240.78.31]) by hub.freebsd.org (Postfix) with ESMTP id A226F37B401; Fri, 2 Nov 2001 04:27:45 -0800 (PST) Received: by flood.ping.uio.no (Postfix, from userid 2602) id 29E1B14C41; Fri, 2 Nov 2001 13:27:44 +0100 (CET) X-URL: http://www.ofug.org/~des/ X-Disclaimer: The views expressed in this message do not necessarily coincide with those of any organisation or company with which I am or have been affiliated. To: Alfred Perlstein Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/usr.bin/head head.c References: <200111020927.fA29RHm01270@freefall.freebsd.org> From: Dag-Erling Smorgrav Date: 02 Nov 2001 13:27:43 +0100 In-Reply-To: <200111020927.fA29RHm01270@freefall.freebsd.org> Message-ID: Lines: 15 User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Alfred Perlstein writes: > Log: > In order to perform faster when doing "head -n", use a pair of > fgetln/fwrite instead of getc/putchar, this seems about five times > faster. I have patches for kqueue that add an event that looks ahead for a particular character and returns the offset of that character into the file or receive buffer or whatnot. I never finished them however, so they're probably slightly stale, and I never got around to implementing the filter function for vnodes, only sockets and ttys. DES -- Dag-Erling Smorgrav - des@ofug.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message