memesearch
fmt Faster Than cout

fmt Faster Than cout

Download Find similar pictures
Text on the meme
{fmt} is now ~35% faster than printf on tinyformat speed test (previously it was "only" ~10% faster) and almost 4x faster than cout. 🚀 How can cout be so slow? Can it be made faster with the same optimisations like fmt has now? It is possible to apply some of the optimisations but not all. iostreams are slow by design because they are stateful and always use the locale. I'm still surprised that they are so much slower though. On Linux the difference is smaller IIRC.
What it means

A Twitter thread discusses the {fmt} C++ formatting library outperforming printf and cout in a benchmark. Someone asks why cout is so slow, and the response explains that iostreams are stateful and locale-aware by design, making them slower; the joke is aimed at programmers reacting to surprising performance differences between C++ output methods. EN: A Twitter thread discusses the {fmt} C++ formatting library outperforming printf and cout in a benchmark. Someone asks why cout is so slow, and the response explains that iostreams are stateful and locale-aware by design, making them slower; the joke is aimed at programmers reacting to surprising performance differences between C++ output methods.

Who
Objects
Tags
Source
Type
image
Size
423×800 · 73.6 KiB
Mood
sarcastic, technical
Language
en
Added