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. ;)
pgpBG2ler9ZSe.pgp
Description: PGP signature
_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers