This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/38132] std::string is faster with -D_GLIBCXX_DEBUG=1 than without
- From: "edwintorok at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 Nov 2008 13:56:51 -0000
- Subject: [Bug c++/38132] std::string is faster with -D_GLIBCXX_DEBUG=1 than without
- References: <bug-38132-15165@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from edwintorok at gmail dot com 2008-11-15 13:56 -------
Created an attachment (id=16682)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16682&action=view)
example to illustrate
compile with g++ -O3, I get:
real 0m0.130s
user 0m0.100s
sys 0m0.028s
compile with g++ -D_GLIBCXX_DEBUG=1 -O3 I get:
real 0m0.080s
user 0m0.056s
sys 0m0.028s
If I explicitly instantiate the template, I get similar effect as of defining
_GLIBCXX_DEBUG:
template class basic_string<char>;
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38132