libstdc++: Add fast path for std::format("{}", x) [PR110801]
This optimizes the simple case of formatting a single string, integer or bool, with no format-specifier (so no padding, alignment, alternate form etc.) libstdc++-v3/ChangeLog: PR libstdc++/110801 * include/std/format (_Sink_iter::_M_reserve): New member function. (_Sink::_Reservation): New nested class. (_Sink::_M_reserve, _Sink::_M_bump): New virtual functions. (_Seq_sink::_M_reserve, _Seq_sink::_M_bump): New virtual overrides. (_Iter_sink<O, ContigIter>::_M_reserve): Likewise. (__do_vformat_to): Use new functions to optimize "{}" case.
Loading
Please register or sign in to comment