My 'test program'
#include <iostream>
#include <vector>
#include <algorithm>
#include <ctime>
using namespace std;
int main()
{
const int SIZE = 16000000;
time_t starttime, endtime;
vector <int> huge;
starttime = time(NULL);
for (size_t i=0; i<SIZE; i++)
{
huge.push_back(rand());
}
for (size_t i=0; i<100; i++)
cout << huge[i] << endl;
sort(huge.begin(), huge.end());
cout << "----------------------------" << endl;
for (size_t i=0; i<100; i++)
cout << huge[i] << endl;
endtime = time(NULL);
cout << "elapsed seconds: " << (endtime - starttime) << endl;
}
ran in
340
seconds on my
32
-bit system.
I suppose you should post the relevant code to get better help.