This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/58437] Sorting value in reverse order is much slower compare to gcc44
- From: "glisse at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 16 Sep 2013 21:18:31 +0000
- Subject: [Bug c++/58437] Sorting value in reverse order is much slower compare to gcc44
- Auto-submitted: auto-generated
- References: <bug-58437-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58437
--- Comment #3 from Marc Glisse <glisse at gcc dot gnu.org> ---
Less confusing testcase:
#include <algorithm>
#include <vector>
using namespace std;
int main()
{
const int num = 10000000;
vector<int> v; v.reserve(num);
for(int i=0;i!=num;++i) v.push_back(-i);
sort(v.begin(), v.end());
}