This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Little C-benchmarks of gcc-2.95.4-ss,gcc-3.3.4-ss,gcc-3.4.1-ss& gcc-3.5.0-ss.


jc-nospam@jr-pizarro.jazztel.es writes:

> * Objectives: Do little benchmarks of the 4 most used recent C-compilers GCC
>   using the most used 2 samples programs: gzip and bzip2. And see the
>   results of size and speed with the most used options -Os and -O2.
>
> My machine is
> AthlonXP 2200+ Model 8 256KiB 1.8 GHz, 512 MiB DDR266 CL2.5 and chipset KT266A.
>
>   My favorite architecture for GCC is i486 because it is simple pipeline
>   non-superscalar with cache's instructions and fairly good for the
>   combination of GCC's optimizer and the complex microprocessor AthlonXP.
>
> I'm using linux-2.4.26 and binutils-2.15.90.0.3-20040415.
>
> * gcc2 = gcc-2.95.4-ss
> * gcc33 = gcc-3.3.4-20040519 (prerelease)
> * gcc34 = gcc-3.4.1-20040514 (prerelease)
> * gcc35 = gcc-3.5.0-20040530 (experimental)
>
> * CFLAGS="-Wall -pipe -DNDEBUG -fomit-frame-pointer -march=i486"

You're measuring on an AthlonXP and use -march=i486?  That's not
fair.  Please schedule for Athlon with -march=athlon.

> * CFLAGS_only_for_gcc35="$CFLAGS -ftree-ccp -ftree-pre -ftree-dce -ftree-dse \
> -ftree-lrs -ftree-combine-temps -ftree-ter -ftree-copyrename \
> -ftree-dominator-opts -ftree-ch -ftree-sra"

Aren't those enabled by default?


> =============================================================================
>
> * gzip-1.2.4 : compressing 512 MiB of /dev/zero and saving to /dev/null.
>
> ( -O? ) : (executable gzip's size) | (real's time executing gzip)

How often did you run these?  CAn you be confident of any measurement
errors?

> ---------   --------------       -----------------
> gcc2  -Os :  64635 bytes | 0m11.042s
> gcc33 -Os :  58938 bytes | 0m10.904s
> gcc34 -Os :  56476 bytes | 0m9.107s    ; quicker
> gcc35 -Os :  56444 bytes | 0m9.399s    ; smaller
> ---------- -------------- ----------
> gcc2  -O2 :  65292 bytes | 0m11.133s
> gcc33 -O2 :  66473 bytes | 0m10.593s
> gcc34 -O2 :  63842 bytes | 0m9.322s    ; quicker
> gcc35 -O2 :  63810 bytes | 0m11.622s   ; smaller (Arghhh, slower!!!)
>
> Fixed conclusion of gzip2: for -O2, gcc35 generates worse speed than old gcc2.
>
> =============================================================================
>
> * bzip2-1.0.2 : compressing 128 MiB of /dev/zero and saving to /dev/null.
>
> ( -O? ) : (executable bzip2's size) | (real's time executing bzip2)
> ---------   --------------       -----------------
> gcc2  -Os :  79064 bytes | 0m11.061s
> gcc33 -Os :  66816 bytes | 0m10.114s   ; quicker
> gcc34 -Os :  66784 bytes | 0m10.175s
> gcc35 -Os :  62708 bytes | 0m10.528s   ; smaller
> ---------- -------------- ----------
> gcc2  -O2 :  83160 bytes | 0m10.976s
> gcc33 -O2 :  74944 bytes | 0m10.162s   ; smaller and quicker
> gcc34 -O2 :  83136 bytes | 0m10.377s
> gcc35 -O2 :  83156 bytes | 0m10.863s
>
> Fixed conclusion of bzip2: for -O2, every except gcc33 generate worse size.
>       And gcc35 is the 2nd who generates worse speed nearly to 1st old gcc2.

83160 is larger than 83156, so gcc2 has the largest code size and all
newer ones generate smaller code size, e.g. 4 bytes ;-)

>
> =============================================================================
>
> For HPC (High Performance Computing), between gcc-2.95.4, gcc-3.3.3,
>  gcc-3.4.0 and gcc-3.5.0-ss, i recommend gcc-3.4.0 as the
>  default stable compiler because gcc-3.5.0-ss is very big, unstable and
>  slow due to many SSA's optimizations that it doesn't match very good results.

GCC 3.5 is not yet ready for production, we're still in stage 1 of the
process.  So your measurements will be encouragement to make 3.5
better - but nobody promised you to any quality of the CVS snapshot of
3.5.

Andreas
-- 
 Andreas Jaeger, aj@suse.de, http://www.suse.de/~aj
  SUSE Linux AG, Maxfeldstr. 5, 90409 Nürnberg, Germany
   GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126

Attachment: pgp00000.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]