This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: does gcc 4.1 generate "faster" binaries than earlier gcc versions?
- From: David Daney <ddaney at avtrex dot com>
- To: Tomasz Chmielewski <mangoo at wpkg dot org>
- Cc: gcc at gcc dot gnu dot org
- Date: Sat, 04 Mar 2006 15:29:18 -0800
- Subject: Re: does gcc 4.1 generate "faster" binaries than earlier gcc versions?
- References: <4409E42D.4010905@wpkg.org>
Tomasz Chmielewski wrote:
Perhaps the question is a bit silly, but I thought I'd ask it anyway.
I'm compiling some software for a Linux/uClibc on a mipsel platform.
Right now I'm using gcc 3.4.4 to do both native and cross-compilation.
A while ago gcc 4.1 was released, and boasts many optimizations.
As the mipsel devices I use are rather slow - here comes the point of my
question: will binaries I compile with gcc 4.1 be faster than these
compiled with 3.4.4?
I don't really care about compilation time; I'm only concerned with the
speed of the binaries made with gcc 3.4.4 and 4.1 (i.e., will gzip
compiled with gcc 4.1 compress a given file faster than gzip compressed
with gcc 3.4.4).
Both gcc-3.4.4 and 4.1 are available to you, so in theory you could
answer this question empirically (assuming that you also have the gzip
sources and a file you could test the resulting gzip executable on).
You don't say what version of Binutils you are using. But with recent
snapshots of Binutils you can use '-Wa,-mno-shared, -ffunction-sections
-fdata-sections -Wl,--gc-sections' to good effect on mips[el]-linux.
David Daney