12

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

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.

Why? It's odd.

Lightness Races in Orbit
  • 378,754
  • 76
  • 643
  • 1,055
user1559521
  • 171
  • 1
  • 6

1 Answers1

10

It is forcefully disabled in RHEL6/7.

https://bugzilla.redhat.com/show_bug.cgi?id=1546704

xosp7tom
  • 2,131
  • 1
  • 17
  • 26