http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53263
dominik.stras...@onespin-solutions.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |NEW Version|4.7.0 |4.8.1 Resolution|FIXED |--- --- Comment #16 from dominik.stras...@onespin-solutions.com --- The situation is much improved in 4.8.1, but still not usable for me in bigger configurations: time ./a.out 10000 real 0m0.907s user 0m0.904s sys 0m0.003s time ./a.out 20000 real 0m3.713s user 0m3.708s sys 0m0.001s time ./a.out 40000 real 0m13.820s user 0m13.812s sys 0m0.001s time ./a.out 80000 real 0m56.759s user 0m56.729s sys 0m0.001s Still O(n^2). (I modified the test program to use argv[1] as loop counter. W/o _GLIBCXX_DEBUG: time ./a.out 10000 real 0m0.008s user 0m0.006s sys 0m0.002s ./a.out 20000 real 0m0.013s user 0m0.008s sys 0m0.004s ./a.out 40000 real 0m0.013s user 0m0.013s sys 0m0.000s ./a.out 80000 real 0m0.026s user 0m0.024s sys 0m0.002s Which shows O(n) behavior.