[Bug libstdc++/77582] New: Improve std::string::clear performace
xiyou.wangcong at gmail dot com
gcc-bugzilla@gcc.gnu.org
Tue Sep 13 17:45:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77582
Bug ID: 77582
Summary: Improve std::string::clear performace
Product: gcc
Version: 6.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: xiyou.wangcong at gmail dot com
Target Milestone: ---
In !_GLIBCXX_USE_CXX11_ABI implementation, string::clear() calls _M_mutate(),
which could allocate memory as we do COW. This hurts performance when
string::clear() is on the hot path.
More information about the Gcc-bugs
mailing list