Making the HTTPd run 20% faster with qrintf-gcc; a sprintf-optimizing compiler
blog.kazuhooku.com
blog.kazuhooku.com
It would be interesting, how the situation is in C++ with its newer stream based output, that is more based on compiler support (as much I know). Does anybody have experiences with it?
My understanding is that the main motivation behind the introduction of iostream was to make a type-safe variant of printf. So with iostreams the _type_ of the value is determined at compile-time, but the representation (e.g. should it be stringified as dec or hex? should it be left-align or right?) needs to be determined at run-time.
In other words, the design issue is only partially solved with iostreams in terms of performance.
2. a lot of libc is lowest common denominator / tons of bloat. printf/sprintf probably does extra locale, multibyte charset, and thread locking shit you don't want.