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

Hugues Talbot (Hugues.Talbot@dms.CSIRO.AU)
Wed, 26 Feb 1997 13:45:28 +1100

Paul Gortmaker wrote:

> [stuff about elf being slower than a.out deletec]
> I'd say that the performance difference between the ELF and a.out versions
> warrants an investigation of some sort. Comparing the "gcc -S" would be
> a good start I guess...

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

You can usually get the speed back using the


optimization flag while compiling with GCC,
(i.e: gcc -03 -fomit-frame-pointer ...). As the man page for GCC
states, there is a caveat:

> -fomit-frame-pointer
> Don't keep the frame pointer in a register for functions that don't
> need one. This avoids the instructions to save, set up and restore
> frame pointers; it also makes an extra register available in many
> functions. It also makes debugging impossible on .

In my experience, using this option at production time (when
you don't need to debug anymore) gives you the speed back if you
really need it. In your case you should really try it.

Let us know if you find a difference.


___Hugues Talbot, CSIRO Mathematical & Information Sciences ___
/ \
| ,-_|\ Down under, Locked Bag 17, North Ryde NSW 2113 |
| / \ Ph: 61 2 9325 3224 Fax: 61 2 9325 3200 |
| \_,-._* <- There (Building E6B, Macquarie University) |
| , E-mail: |
| WWW: |