[Bug c++/38132] std::string is faster with -D_GLIBCXX_DEBUG=1 than without

edwintorok at gmail dot com gcc-bugzilla@gcc.gnu.org
Sat Nov 15 13:58:00 GMT 2008



------- 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



More information about the Gcc-bugs mailing list