public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/53263] New: priority_queue is very slow if -D_GLIBCXX_DEBUG is used
@ 2012-05-07 11:48 dominik.strasser@onespin-solutions.com
  2012-05-07 12:06 ` [Bug libstdc++/53263] " paolo.carlini at oracle dot com
                   ` (21 more replies)
  0 siblings, 22 replies; 23+ messages in thread
From: dominik.strasser@onespin-solutions.com @ 2012-05-07 11:48 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 53263
           Summary: priority_queue is very slow if -D_GLIBCXX_DEBUG is
                    used
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: dominik.strasser@onespin-solutions.com


Created attachment 27332
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27332
Minimalistic example demonstrating the problem

I've measured the most simplistic usage of priority queue.
With 5,000 elements, the run time is:
real    0m0.005s
user    0m0.002s
sys     0m0.002s
With 10,000 elements, the run time is:
real    0m0.006s
user    0m0.002s
sys     0m0.002s

If I switch on -D_GLIBCXX_DEBUG, the situation changes:
5,000 elements:
real    0m11.216s
user    0m11.210s
sys     0m0.003s

10,000 elements:
real    0m48.354s
user    0m48.344s
sys     0m0.003s

20,000 elements:
real    2m56.971s
user    2m56.941s
sys     0m0.002s

So in addition to some overhead, there seems to be some quadratic behavior
inside the debug version as the run time is 4x for 2x elements.


^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2013-10-16 11:13 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-07 11:48 [Bug libstdc++/53263] New: priority_queue is very slow if -D_GLIBCXX_DEBUG is used dominik.strasser@onespin-solutions.com
2012-05-07 12:06 ` [Bug libstdc++/53263] " paolo.carlini at oracle dot com
2012-05-07 12:07 ` paolo.carlini at oracle dot com
2012-05-07 12:43 ` dominik.strasser@onespin-solutions.com
2012-05-07 12:55 ` paolo.carlini at oracle dot com
2012-05-07 13:37 ` pluto at agmk dot net
2012-05-07 20:51 ` fdumont at gcc dot gnu.org
2012-05-07 21:14 ` paolo.carlini at oracle dot com
2012-05-08  8:07 ` pluto at agmk dot net
2012-05-08  9:56 ` paolo.carlini at oracle dot com
2012-05-08 20:02 ` fdumont at gcc dot gnu.org
2012-05-11 20:20 ` fdumont at gcc dot gnu.org
2012-05-12 21:57 ` paolo.carlini at oracle dot com
2012-05-14 20:20 ` fdumont at gcc dot gnu.org
2012-06-11 15:06 ` dominik.strasser@onespin-solutions.com
2012-06-11 15:27 ` paolo.carlini at oracle dot com
2013-06-24 11:34 ` dominik.strasser@onespin-solutions.com
2013-06-24 11:47 ` dominik.strasser@onespin-solutions.com
2013-06-24 11:51 ` paolo.carlini at oracle dot com
2013-06-24 11:58 ` paolo.carlini at oracle dot com
2013-06-24 12:13 ` dominik.strasser@onespin-solutions.com
2013-06-24 12:17 ` paolo.carlini at oracle dot com
2013-10-16 11:13 ` redi at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).