fmt::format()
, if anyone's interested:void FmtLogMessage(Class log_class, Level log_level, const char* filename, unsigned int line_num, const char* function, const char* format, fmt::format_args args);
fmt::BasicWriter<>::write_int<>()
is taking up 2.11Mi. This seems a little excessive to me and I'm wondering if you ever heard anything about that before?
13.8% 2.02Mi fmt::BasicWriter<>::write_int<>() 2.11Mi 5.1%
20.1% 416Ki void fmt::BasicWriter<char>::write_int<long long, fmt::FormatSpec>(long long, fm 430Ki 19.9%
19.8% 409Ki void fmt::BasicWriter<char>::write_int<unsigned long long, fmt::FormatSpec>(unsi 424Ki 19.6%
19.8% 409Ki void fmt::BasicWriter<char>::write_int<unsigned long, fmt::FormatSpec>(unsigned 424Ki 19.6%
18.6% 385Ki void fmt::BasicWriter<char>::write_int<int, fmt::FormatSpec>(int, fmt::FormatSpe 400Ki 18.5%
18.3% 379Ki void fmt::BasicWriter<char>::write_int<unsigned int, fmt::FormatSpec>(unsigned i 393Ki 18.2%
3.5% 71.6Ki void fmt::BasicWriter<char>::write_int<bool, fmt::FormatSpec>(bool, fmt::FormatS 86.1Ki 4.0%
back_inserting_iterator
do nothing and =() calls push_back
, so the assignment actually advances the underlying iterator. I did similarly for the truncating_iterator
so that --(), ++(), and *() do nothing but return *this, and assignment assigns to - and increments - the underlying iterator - if count hasn't reached limit yet. Something like if (count++ < limit) *out_++ = value;
. As a template function, to avoid the issue of value_type. I'll see if I can figure out how to make a PR.