This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/77582] Improve std::string::clear performace
- From: "xiyou.wangcong at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 13 Sep 2016 17:47:31 +0000
- Subject: [Bug libstdc++/77582] Improve std::string::clear performace
- Auto-submitted: auto-generated
- References: <bug-77582-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77582
--- Comment #1 from Cong Wang <xiyou.wangcong at gmail dot com> ---
Created attachment 39614
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=39614&action=edit
A possible patch
This patch improves it by using _S_empty_rep directly when
_GLIBCXX_FULLY_DYNAMIC_STRING is not enabled.