3 ms·
Reducing printf call overhead with variadic templates
- asdfasgasdgasdg 7y agoabsl::StrFormat uses something like this technique: https://abseil.io/docs/cpp/guides/format https://abseil.io/docs/cpp/guides/format
- flohofwoe 7y agoInteresting side note: https://github.com/fmtlib/fmt https://github.com/fmtlib/fmt of the same author has been aded to the C++20 standard. One of the few inclusions into the standard which (IMHO) can be universally considered to be a good thing. If you're coming from printf() or iostreams, fmtlib is a joy to use, especially together with pystring (https://github.com/imageworks/pystring https://github.com/imageworks/pystring). Both libs don't fix the underlying problems of std::string, but at least they reduce the pain of working with strings in C++ considerably.