Quality of GCC 3.1

Rene Rebe rene.rebe@gmx.net
Tue Jun 18 02:34:00 GMT 2002


Hi.

On: Tue, 18 Jun 2002 08:22:46 +0200,
    Wit Jakuczun <wj178839@wp.pl> wrote:
> Dnia 18.06 2002 , o godzinie 00:04
> Rene Rebe napisał(a) :
> 
> > 
> > For compiling a whole distribution, it is not that much slower - I can
> > try to produce some statistic for arround 400 packages if needed.
> > 
> > But considering the feature improvements (Better ANSI-C++ support and
> > new optimizations it is quite reasonable that it got slower ...
> > 
> Why? It shouldn't be like that! Try the code below:

In the lines above I meant compile time - not run-time ... Considering
the new optimizations the resultig binary _should_ be faster ...

> ...
> std::ofstream out("data.file");
> for(int i=0;i<1000000;++i) out << i << " ";
> ...

For this case you are right: Here the results of 2.95.3 vs. 3.1.

		      gcc-2.95.3	     gcc-3.1
-------------------------------------------------------------
time to compile:      real    0m0.209s	     real    0m0.927s
		      user    0m0.120s	     user    0m0.890s
		      sys     0m0.010s       sys     0m0.030s

binary size:	      6410		     5664

runtime:	      real    0m0.778s	     real    0m2.411s
		      user    0m0.120s	     user    0m2.360s
		      sys     0m0.010s	     sys     0m0.040s
-------------------------------------------------------------
time to compile -O2   real    0m0.255s	     real    0m1.104s
		      user    0m0.150s	     user    0m1.020s
		      sys     0m0.020s	     sys     0m0.030s

binary size:	      6924		     8979

runtime:	      real    0m0.671s	     real    0m2.459s
		      user    0m0.450s	     user    0m2.300s
		      sys     0m0.030s	     sys     0m0.040s
-------------------------------------------------------------
time to compile -Os   real    0m0.208s	     real    0m1.004s
		      user    0m0.100s	     user    0m0.930s
		      sys     0m0.050s	     sys     0m0.080s

binary size:	      6916		     9019

runtime:	      real    0m0.697s	     real    0m2.534s
		      user    0m0.380s	     user    0m2.320s
		      sys     0m0.110s	     sys     0m0.030s
-------------------------------------------------------------

> Best regards
> 	Wit

k33p h4ck1n6
  René

--  
René Rebe (Registered Linux user: #248718 <http://counter.li.org>)
e-mail:   rene.rebe@gmx.net, rene@rocklinux.org
web:      www.rocklinux.org, drocklinux.dyndns.org/rene/

Anyone sending unwanted advertising e-mail to this address will be
charged $25 for network traffic and computing time. By extracting my
address from this message or its header, you agree to these terms.



More information about the Gcc mailing list