Re: a.out binaries that are 66% faster than ELF

Eric Youngdale (
Tue, 25 Feb 1997 22:52:26 -0500

> Yes, a.out is known to be generally faster than ELF, because
>ELF requires the use of an extra register. x86 processors being
>register-starved, I'm not surprised that you get the sort of result
>you quote. Generally the speed difference is negligible though (about

No. It is only in shared libraries that you lose a register.
In a normal executable, you shouldn't lose a thing. In fact the
contents of the text section of an executable should be identical
provided that the optimization and other compiler flags are set the same.

It is more likely that some lossage was added to some libc
function in which wasn't in (the old a.out

One simple thing to try is to build this application with profiling
under ELF:

1) Try and make sure you have the profiling version of libc installed.
This will be /usr/lib/libc_p.a.
2) Build the program with profiling. The gcc flags are: "-g -pg", and
you should link against the profiling library with "-lc_p".
3) Next, run the program - a 12 second run should be just fine for
this. A file will be generated 'gmon.out' in the current directory.
4) Finally run the command 'gprof rc5 gmon.out >', where
rc5 is the name of the executable you ran in step 2. The file will contain an ascii report showing you where the time
is being spent.

If this doesn't show you anything then I would like to see the
two binaries (a.out and ELF) of this thing. I haven't been paying
close attention so I don't really know what RC5 is. Could someone who
has both of these handy contact me so that I could arrange to get both
of them?