This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: /usr/include/curses.h not fixed on sparc-sun-solaris2.5.1



> Fully agreed! What seriously worried me in that case was the fact that, 
> without changing a single line of code, our entire application became
> more than twice as slow, simply by using egcs (with the new STL) instead
> of gcc/libg++.

It's not egcs vs gcc, since 2.8.x has the SGI STL as well.  99% of the
time SGI's implementation is a vast improvement, but I think I agree
with you that their specialization of vector<bool> is a lose.

It would be possible to eliminate this problem, or make it a user choice,
by modifying the preprocessor directives in stl_bvector.h slightly.
This file tries to see if the compiler has support for partial
specialization; if it does not, it defines a class called bit_vector,
otherwise it makes a specialization for vector<bool,Alloc>.

The bottom line is that you could recover your lost performance by a
slight modification of this header (and we should perhaps ask the SGI
STL group for a better solution for this problem).





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]