http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58440
Bug ID: 58440 Summary: There seems to be a major performance regression in std::sort performance Product: gcc Version: 4.6.2 Status: UNCONFIRMED Severity: major Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: jmbnyc at gmail dot com Created attachment 30828 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30828&action=edit cpp file the illustrates bug The attached simple program illustrates a major performance degradation. I first noticed this in gcc 4.7.2. I tried to figure out if the was the compiler or the std library and was able to get 2 systems with same CPU but different gcc versions to illustrate the problem also exists in 4.6. It might exist in 4.5 but I could not test that combination. Here are my results: Intel(R) Xeon(R) CPU X5680 @ 3.33GHz GCC 4.4.3 -bash-3.2$ g++ -O3 bug.cpp -o sort -bash-3.2$ ./sort elapsed: 12.970126 GCC 4.6.2 -bash-3.2$ g++ -O3 bug.cpp -o sort -bash-3.2$ ./sort elapsed: 77.040297