This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: C++ compile time (again)
- From: Karel Gardas <kgardas at objectsecurity dot com>
- To: Diego Novillo <dnovillo at redhat dot com>
- Cc: Wolfgang Bangerth <bangerth at ices dot utexas dot edu>, "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Tue, 17 Jun 2003 18:01:22 +0200 (CEST)
- Subject: Re: C++ compile time (again)
On Tue, 17 Jun 2003, Diego Novillo wrote:
> On Tue, 2003-06-17 at 09:35, Karel Gardas wrote:
>
> > Options used to compile all cc files are:
> >
> > -I../include -Wall -fpermissive -DPIC -fPIC -c
> >
> > times (user only) for cd mico/orb; time make are:
> >
> > gcc2.95.4: 6m4s
> > gcc3.4: 9m24s
> > gcc3.5: 11m17s
> >
> >
> > Anything else what should I test for you?
> >
> You haven't used optimization? If not, then timings are not including
> the SSA transformations. Could you add that?
Sure! I have tried both -O1 and -O2 with both gcc3.4 and 3.5. In all four
options compilation fails with:
c++ -I../include -O2 -Wall -fpermissive -DPIC -fPIC -c fixed.cc -o
fixed.pic.o
/usr/include/bits/mathinline.h: In member function `void
FixedBase::adjust(unsigned char)':
/usr/include/bits/mathinline.h:429: error: can't find a register in class
`
FP_TOP_REG' while reloading `asm'
make: *** [fixed.pic.o] Error 1
which is IMHO some problem in gcc - since the problematic header file is
from glibc2.2.5 distro...
Anyway, some part of MICO is compilable (till this failure) and so time
comparison looks:
gcc3.4 -O1: 4m4.540s
gcc3.4 -O2: 4m51.580s
gcc3.5 -O1: 7m22.990s
gcc3.5 -O2: 6m38.970s
Yes, that's not error -O1 is really slower than -O2. In addition if you
will try it, you will find that on typecode.cc file, gcc3.5 + -O1 requires
a lot more memory to compile this file. - peak value was about 410MB -
while standard (for recent gcc with mem hack on) is about 210MB.
This is on linux with 512MB real mem + 512MB swap.
Cheers,
Karel
--
Karel Gardas kgardas@objectsecurity.com
ObjectSecurity Ltd. http://www.objectsecurity.com