[Bug libstdc++/53263] priority_queue is very slow if -D_GLIBCXX_DEBUG is used

dominik.strasser@onespin-solutions.com gcc-bugzilla@gcc.gnu.org
Mon Jun 24 11:32:00 GMT 2013


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53263

dominik.strasser@onespin-solutions.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |NEW
            Version|4.7.0                       |4.8.1
         Resolution|FIXED                       |---

--- Comment #16 from dominik.strasser@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.



More information about the Gcc-bugs mailing list