2 ms·
> People who deal in megabytes have different problems than people who deal in petabytes. I just hope that this is not meant ad-hominem. At the very least it's
by jstimpfle 7y ago
> People who deal in megabytes have different problems than people who deal in petabytes.
I just hope that this is not meant ad-hominem. At the very least it's a bad reply, unless you are dealing with petabytes per second. (Btw one of my current projects is a text editor that can handle gigabytes in memory; local operations take 5-50 microseconds. So I have reason to think I'm not entirely clueless).
> I rarely log messages anyway, preferring to set state that I can then printout on command (e.g. siginfo)
That sounds much more reasonable to me giving the volumes that you cite, and why shouldn't we use printf() for that?
Why would printf "vary in performance by 10msec" or more, in ways that another application wouldn't? For how much data is that? How many printf() calls?
Anyway I shouldn't have gotten in the woods here. The blanket statement that printf() is slow and therefore an obscure API like sbrk() is a better use, is nonsensical for a guide that seemingly gives general advice for memory allocation.