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

Gerald Pfeifer pfeifer@dbai.tuwien.ac.at
Wed May 13 07:44:00 GMT 1998


On Tue, 12 May 1998, Per Bothner wrote:
>> our code took more than twice(!) as long due to the new
>> specialization of vector<bool>. :-(
> But that has nothing to do with sizeof(bool)!

I'm fully aware of that; I just wanted to point out that one should
probably not "surprise" users that way.

I.e., should single-byte bools cause a similiar performance hit -- which
I now understand they most probably will not --, I'd strongly suggest not
to make this the default. 

> Whether vector<bool> should use a bit-packed representation
> depends on the application.  Thus the programmer needs a
> choice between packed and unpacked bool arrays.

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++.

Back than it took me quite some time of debugging until I found the source
of the problem, that's why I felt like raising a warning flag now...

Gerald
-- 
Gerald Pfeifer (Jerry)      Vienna University of Technology
pfeifer@dbai.tuwien.ac.at   http://www.dbai.tuwien.ac.at/~pfeifer/




More information about the Gcc-bugs mailing list