Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Strlcpy and Strlcat – Consistent, Safe, String Copy and Concatenation (1999) [pdf]. Parent comment
It need not even be a performance hit. The compiler could recognize the idiom of code such as
snprintf(buffer, bufLen, "%s%s%s", s, t, u);
b = buffer; e = b + bufLen: while((b < e) && (*b++ = *s++)); while((b < e) && (*b++ = *t++)); while((b < e) && (*b++ = *u++)); *b = 0;
There are no comments on this comment yet.
It need not even be a performance hit. The compiler could recognize the idiom of code such as
and optimize it into (example possibly buggy; my C is rusty)