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]

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


* 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"
* 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"

=============================================================================

* 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)
---------   --------------       -----------------
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.

=============================================================================

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.

There is NOT WARRANTY of the possible bugs of any compiler gcc.

In my opinion, for the next year, i could recommend gcc-3.5.x as the
 default compiler, but couldn't for this year.

I don't see why gcc-3.4.0 is little bad than gcc-3.3.3 in the gzip's size
 using the -O2, please disassemble bzip2 (or gcc -S) and investigate the
 optimization's leaks.

                      Pizarro (c) 2004-June-01 (licensed it as GNU's FDL).


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