This is the mail archive of the 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?

David Daney wrote:
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).

Well, now I have only gcc-3.4.4 available for mipsel/uClibc; I don't have gcc-4.1 as a cross-compiler nor a native compiler.
As creating a cross-compiler is not an easy process, I'd have to compile a native 4.1 gcc.
And compiling gcc-4.1 on this mipsel device could take a week or so I guess (provided everything goes well after I type "make <enter>", which is not always the case).
Hence my question.

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.

I'm using binutils 2.16.1. Does it still apply here?

-- Tomasz Chmielewski WPKG - Software deployment with Samba

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