3 ms·
Sure, if you have a cold instruction cache. If stdio is not in your instruction cache, or at least in L2, then you’re not using it very much, and you won’t get
by klodolph 6y ago
Sure, if you have a cold instruction cache. If stdio is not in your instruction cache, or at least in L2, then you’re not using it very much, and you won’t get much benefit from moving it to a different thread. My measurements put stdio formatting at around 100ns for the typical messages I’m printing. So, offloading it to another thread is a fairly clear loss.
Even for floating point numbers, you’ll hit the fast path with fairly high regularity. My measurements put it at around 80ns for a double, on my system, most of the time.