Skip site navigation (1)Skip section navigation (2)
Date:      02 Nov 2001 13:27:43 +0100
From:      Dag-Erling Smorgrav <des@ofug.org>
To:        Alfred Perlstein <alfred@FreeBSD.org>
Cc:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/usr.bin/head head.c
Message-ID:  <xzpitctcq80.fsf@flood.ping.uio.no>
In-Reply-To: <200111020927.fA29RHm01270@freefall.freebsd.org>
References:  <200111020927.fA29RHm01270@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Alfred Perlstein <alfred@FreeBSD.org> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?xzpitctcq80.fsf>