This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: why does arm-target gcc-3.4.4 have a better performace than gcc-4.2.4?
- From: Ian Lance Taylor <iant at google dot com>
- To: Heyu Zhu <zhu dot heyu at gmail dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Tue, 22 Jun 2010 07:56:47 -0700
- Subject: Re: why does arm-target gcc-3.4.4 have a better performace than gcc-4.2.4?
- References: <AANLkTin1z91g727_lJTb0plnMPTshz1nYnfeZsBW0z7d@mail.gmail.com>
Heyu Zhu <zhu.heyu@gmail.com> writes:
> I configure gcc as below
>
> ../gcc-4.2.4(or gcc-3.4.4)/configure
> --target=arm-elf
> --prefix=/usr/local/arm
> --enable-languages=c
> --without-headers
> --with-gnu-ld
> --with-gnu-as
> --disable-shared
> --disable-threads
> --disable-libssp
>
> Executable binary file generated by gcc-3.4.4 is 15% faster than by
> gcc-4.2.4 for some test programs, for example, Dhrystone.
>
> Need i configure gcc-4.2.4 with special options to get a good
> performace as gcc-3.4.4 does?
There are no configure options which will make a difference here.
There may be some runtime options which will help. In particular,
make sure you use -O2 and use a -march option appropriate for your
target.
It is of course entirely possible that there has been some
optimization regression in gcc. If you can pin down the code which is
slower, please open a bug report with a test case as described at
http://gcc.gnu.org/bugs/ . Thanks.
Ian