Re: STL container question
Ioannis Vranos wrote:
Ioannis Vranos wrote:
The program had a serious bug.
> [...]
>
>
And my results:
1. const size_t SIZE= 90000;
john@john-desktop:~/Projects/src$ ./foobar_cpp
Creating vector with 90000 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 24.79 seconds
The sorting of the list took 0.1 seconds
john@john-desktop:~/Projects/src$
Just for the record, my system is:
OS: Ubuntu 8.04 x86.
Compiler: gcc version 4.2.3 (Ubuntu 4.2.3-2ubuntu7)
Hardware: Pentium III 1 GHz, 1 GB RAM.
The system I tested on is DELL T7400 (dual Intel Xeon quad core), Vista
Ultimate 64, Visual C++ 2008 sp1, 4 gigs of RAM. Since no parallelizing
is done in your program, the number of cores doesn't matter, but the CPU
is faster, and while I would love to try it on a 16-gigabyte machine or
better, I don't have access to one. My machine is what our clients are
getting, so the results stand. You're free to speculate what makes it
so *bad* on your machine, but I'd seriously think about switching to a
real OS and a real compiler, if I got such bad results as you do.
V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask