Re: STL container question
Ioannis Vranos wrote:
Hendrik Schober wrote:
Ioannis Vranos wrote:
The program had a serious bug.
corrected:
[...]
Creating vector with 100000 elements... Done!
Filling list with vector elements... Done!
Timing the sorting of the vector... Done!
Timing the sorting of the list... Done!
The sorting of the vector took 0.015 seconds
The sorting of the list took 0.437 seconds
Again, increase the number of const size_t SIZE so as to exceed 1-2
seconds for the sorting of one container, and then post your results.
For example try
const size_t SIZE= 400000;
-------------- a debug build:
Creating vector with 200000 elements... Done!
Filling list with vector elements... Done!
Timing the sorting of the vector... Done!
Timing the sorting of the list... Done!
The sorting of the vector took 0.203 seconds
The sorting of the list took 4.602 seconds
-------------- a release build:
Creating vector with 200000 elements... Done!
Filling list with vector elements... Done!
Timing the sorting of the vector... Done!
Timing the sorting of the list... Done!
The sorting of the vector took 0.016 seconds
The sorting of the list took 0.062 seconds
-------------- another release build:
Creating vector with 300000 elements... Done!
Filling list with vector elements... Done!
Timing the sorting of the vector... Done!
Timing the sorting of the list... Done!
The sorting of the vector took 0.016 seconds
The sorting of the list took 0.125 seconds
---------------------------------------------------------
Tell me again, what does your example prove? And, again, get a better
compiler and a better library. Whatever version you're using is *crap*,
obviously.
V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask