nmh-workers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nmh-workers] discard() declared eeevil


From: Valdis . Kletnieks
Subject: Re: [Nmh-workers] discard() declared eeevil
Date: Mon, 26 Dec 2011 22:32:16 -0500

On Mon, 26 Dec 2011 20:29:37 EST, Jeffrey Honig said:

> If I remember right, m_getfld.c tries to eek the most performance out of
> header field scanning by taking advantage of knowledge of the stdio
> structures to peek further into the buffer and do an optimized ungetc().

Wow, is *that* what it was doing?  I got confused because I didn't see a #else
clause that had ungetc() in it.  Even the fallback cases were somewhere between
abstruse and baroque.

> That was necessary in the days when a VAX was fast.  But these days my cell
> phone is faster than a room full of VAXen and we could re-write the code to
> be more readable and no-one would know the difference.

With 2 decades of improvement in gcc and glibc, it's quite possible that just
coding ungetc() and letting the computer figure out the best way to do it
would actually result in faster code than what nmh is doing. ;)

Attachment: pgpNqPwybDdAV.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]