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: does gcc 4.1 generate "faster" binaries than earlier gcc versions?


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


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