-D_GLIBCXX_USE_CXX11_ABI = 1对于CentOS 7上的devtoolset-7无效 [英] -D_GLIBCXX_USE_CXX11_ABI=1 ineffective for devtoolset-7 on CentOS 7
问题描述
最近,我注意到我的程序具有很大的性能下降,因为版本低于5的gcc的标准库实现使得O(n)
Recently, I noticed that my program has a big performance regression because the standard library implementation of gcc with version earlier than 5 makes list::size()
an O(n)
.
我正在使用CentOS 7.2,其默认gcc版本为4.8.5.因此,我安装了scl和devtoolset-7,并重新构建了程序.但是,我发现程序中的list::size()
仍然是O(n)
方法,即使我将_GLIBCXX_USE_CXX11_ABI
显式设置为1.
I'm using CentOS 7.2 whose default gcc version is 4.8.5. So I installed scl and devtoolset-7, and rebuilt my program. However, I found that list::size()
in my program is still an O(n)
method, even if I explicitly make _GLIBCXX_USE_CXX11_ABI
to 1.
为什么?很奇怪.
推荐答案
在RHEL6/7中已被强制禁用.
It is forcefully disabled in RHEL6/7.
https://bugzilla.redhat.com/show_bug.cgi?id=1546704
这篇关于-D_GLIBCXX_USE_CXX11_ABI = 1对于CentOS 7上的devtoolset-7无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!