Bug#102193: gcc-3.0: compiled code with gcc 3.0 is slow and big
Anthony DeRobertis writes:
>
> On Friday, January 4, 2002, at 08:17 , Morten Brix Pedersen wrote:
>
> > mbp:~$ g++ benchmark.cpp ; ls -l a.out ; time a.out ; g++-3.0
> > benchmark.cpp
> > ; ls -l a.out ; time a.out
> >
> Well, first, take . out of your path! I get:
>
> -rwxr-xr-x 1 anthony anthony 42840 Jan 5 23:46 a.out
>
> real 0m7.870s
> user 0m7.210s
> sys 0m0.490s
> -rwxr-xr-x 1 anthony anthony 37976 Jan 5 23:47 a.out
>
> real 0m13.835s
> user 0m13.240s
> sys 0m0.420s
>
> Ouch! Turning on the optimizer does help some, though:
>
> anthony@bohr:morten$ g++ -O3 -march=i686 benchmark.cpp ; ls -l
> a.out ; time ./a.out ; g++-3.0 -O3 -march=i686 benchmark.cpp; ls
> -l a.out; time ./a.out
> -rwxr-xr-x 1 anthony anthony 19173 Jan 5 23:50 a.out
>
> real 0m3.146s
> user 0m2.640s
> sys 0m0.470s
> -rwxr-xr-x 1 anthony anthony 19109 Jan 5 23:51 a.out
>
> real 0m4.617s
> user 0m4.130s
> sys 0m0.410s
> anthony@bohr:morten$
>
> Now only 1/3 slower. Still not good.
updated results for g++-3.1:
no opt -O2 -O3
-----------------------------------------------------------------
gcc-2.95: real 0m9.825s real 0m4.322s real 0m4.327s
user 0m8.840s user 0m3.700s user 0m3.690s
sys 0m0.540s sys 0m0.600s sys 0m0.590s
gcc-3.0: real 0m16.070s real 0m6.147s real 0m6.079s
user 0m15.710s user 0m5.660s user 0m5.700s
sys 0m0.310s sys 0m0.400s sys 0m0.360s
gcc-3.1: real 0m9.332s real 0m7.815s real 0m6.184s
user 0m8.890s user 0m7.420s user 0m5.770s
sys 0m0.370s sys 0m0.380s sys 0m0.390s
Worth forwarding the report, or just close it, because gcc-3.x comes
with a conforming libstdc++, and 2.95 not?
--
To UNSUBSCRIBE, email to debian-gcc-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Reply to: