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]

Re: Debug formats on Linux


> 
> On Sat, Oct 28, 2000 at 02:13:45AM +0200, jfm2@club-internet.fr wrote:
> > I benchmarked -fomit-frame-pointer with gcc 2.95 and speed bonus was
> > well under 10%, and I think under 5%.  I found this funny since I
> > would expect an additional register woukld have a big impact on
> > register-starved x86s.  But unless omit-frame-pointer gives a far
> > bigger impact I would not want to go through yet another massive
> > change on Linux.  I have had enough with libc4 -> libc5 -> glibc plus
> > the uncompatible C++ libraries from
> >  gcc-2.7 -> egcs -> gcc-2.9[56]->gcc-3
> 
> To some extent, it depends on the processor (386, 486, pentium, etc.).  Unlike
> other (saner) architectures, the x86 instruction family uses a different
> address format to address things via the stack register compared to the frame
> pointer register.  This address format uses larger instructions, which reduces
> the efficiency of the i-cache slightly.  I believe in the older processors also
> executed these instructions slower due to having to use a prefix as part of the
> instruction (I haven't looked in detail what the current Pentium-III and AMD
> processors do with these instructions).
> 

I tried with a PII/400.  I used alternatiely cpu=i386, cpu=i686 and
arch=i686.  omit-frame-pointer never made a big difference (ie > 10%),
ever was far smaller than 10%.

Fropm distant memories on the 386 use of (E)BP is not as flexible than
other registers like eax so it is perhaps difficult to use it as an
additional general register.  I don't know if is still true when you
allow use of PPro instructions

-- 
			Jean Francois Martinez

Project Independence: Linux for the Masses
http://www.independence.seul.org


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