GCC-3 additions - related question

Corinna Vinschen cygwin-apps@cygwin.com
Mon Oct 15 02:21:00 GMT 2001

On Mon, Oct 15, 2001 at 06:32:20AM +1000, Danny Smith wrote:
>  --- Robert Collins <robert.collins@itdomain.com.au> wrote: > 
> > ----- Original Message -----
> > From: "Danny Smith" <danny_r_smith_2001@yahoo.co.nz>
> > 
> > 
> > 
> > > Lately, I've been hearing this with STL code:
> > > "This compile well using gcc!  Why it not MS!"
> > > Thats what I want -- the first part of that anyway.
> > 
> > Danny, it sounds like you might know the answer to this: are there known
> > issues for building native code using the cygwin gcc with C++ templates?
> > 
> > Specifically, I've asked Chris on the developer list about using
> > templates for some stuff (iterators particularly are getting real old
> > for me), see
> > http://www.cygwin.com/ml/cygwin-developers/2001-10/msg00018.html
> > for the thread.
> I've built STLPort, Bench++ (Stepanov benchmarking suite) and some of the
> Boost package with mingw 2.95.3 and gcc's ability to build template code is
> not a problem compared with what I've read for other windows compilers. 
> The issue is with efficiency.  Efficiency of writing generic code may be
> enhanced by templates.  But...  Debugging template code is a real pain  --
> stange errors with instantiatiation of templates have to be tracked through
> a maze of headers.  And there is a runtime performance hit.  I don't have
> the Bench++ results handy but there was a significant penalty for using
> generic template code compared to C code.   I expect gcc-3.0 to be better,
> at least as far as speed of compiled code. Speed of compilation, however,
> is a problem when your testing.
> I would agree with Corinna.

Another reservation was the observation in earlier gccs that using
templates bloats the size of the executable/dll drastically.  Is that
still true?


Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.

More information about the Cygwin-apps mailing list