Mail Archives: djgpp/1999/01/20/04:19:47
On Wed, 20 Jan 1999, Dong-Yueh Liu wrote:
> The program is compile with -O3 option to turns on optimizations.
In many cases, -O2 is better than -O3.
> I am amazed by the result since I expected that vector should be
> faster the deque, but the result is reverse. The following is that
> I use VC++ 6.0 to compile the same program:
> vector: 0.961 seconds
> deque: 4.446 seconds
>
> Can anyone explain why the efficiency of vector is worse than
> deque using gcc2.81?
``Use the source, Luke!'' The sources of the implementation of vector
used by DJGPP are free to browse and hack (get v2gnu/lgp2811s.zip).
I think some implementations of vector reallocate memory very often,
which might explain the difference. But that's a speculation.
- Raw text -