lkml.org 
[lkml]   [1997]   [Feb]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectDon't omit frame pointer (was Re: a.out binaries faster)
Date
From
> 
>
> 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
> 5%).
>
> You can usually get the speed back using the
>
> -fomit-frame-pointer
>
> 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 is a terrible thing and is generally only
done much on linux becasue Linus decided to use it when
building the kernel (I'd say a good percentage of gcc users
who don't use Linux never used it...)

What this does it makes core dumps impossible to get meaningful
information from if you core dump in a library function (which is
possible even with debugged libraries which receive pointers to work
on (like free)).

Please don't -fomit-frame-pointer when building general use libraries.

Selecting better algorithms is a far better way to optimize code then
playing with compiler optimizations.




--
marty
leisner@sdsp.mc.xerox.com



\
 
 \ /
  Last update: 2005-03-22 13:39    [W:0.080 / U:2.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site