* Greg Shenaut <[EMAIL PROTECTED]> [011102 08:42] wrote:
> In message <[EMAIL PROTECTED]>, Alfred Perlstein cleopede:
> >can someone please check this out, it makes "head -n" about five
> >times faster.  (also nukes a 'register', sorry :))
> 
> I'm curious--does using fgetln here always result in a win, or just
> with short lines?  I'm thinking of the impact of realloc and memcpy
> on speed.

Ugh, I should have checked that, my guess is that performance
isn't going ot be much worse, if there is a real problem
I'll rework it some more, possibly using fread instead of
fgetln.

-- 
-Alfred Perlstein [[EMAIL PROTECTED]]
'Instead of asking why a piece of software is using "1970s technology,"
 start asking why software is ignoring 30 years of accumulated wisdom.'
                           http://www.morons.org/rants/gpl-harmful.php3

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to