You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using libstdc++ we can replace the std::time_put facet with std::__timepunct,
which will can format tm into the preallocated memory buffer. This will avoid the std::basic_ostringstream overhead.
std::__timepunct is a part of libstdc++ ABI.
What do you think about this replacement?
The text was updated successfully, but these errors were encountered:
Thanks for the suggestion but I don't think it's worth using non-standard APIs for this specific case. There might be other ways to optimize locale-specific formatting such as providing a custom stream.
* Fix unicode test
* Add xchar support to chrono formatter
* Replace strftime with std::time_put
* Add std::locale support to std::tm formatter
* Use predefined names and formats for C-locale
* Performance improvement
* Make locale-independent and C locale formats consistent among platforms
libstdc++
has a non standard facetstd::__timepunct
. It is used instd::time_put
:https://github.com/gcc-mirror/gcc/blob/2a62b047eca5859142f024c339cd2686635cf5b1/libstdc%2B%2B-v3/include/bits/locale_facets_nonio.tcc#L1175-L1213
When using
libstdc++
we can replace thestd::time_put
facet withstd::__timepunct
,which will can format
tm
into the preallocated memory buffer. This will avoid thestd::basic_ostringstream
overhead.std::__timepunct
is a part oflibstdc++
ABI.What do you think about this replacement?
The text was updated successfully, but these errors were encountered: