Jason Stubbs <[EMAIL PROTECTED]> writes:
> On Saturday 29 November 2003 22:25, Ulrich Rhein wrote:
>> Jason Stubbs <[EMAIL PROTECTED]> writes:
>> > The biggest improvement in performance will come by adding
>> > -fomit-frame-pointer to your flags.
>> That won't actually change anything but remove three instructions from
>> some function calls. The resulting performance improvement is
>> practically insignificant.
> WTF? Have you tried it?

Yes.

> Benchmarks give a 30% improvement across the board and 
> I must say there definately is a very noticable improvement to system 
> responsiveness.

Entirely unrealistic. 

> It may only remove three instructions from some function 
> calls, but it frees up a register or two allowing for better optimisation in 
> other ways.

On x86, it's exactly one register (namely %ebp). I have tried it with
gcc -S -O2 on a small project (~1.600 SLOC) of mine. In the functions in
which %ebp is not used as frame pointer, it is not used at all.

Could you point out some pieces of code where gcc does such an
optimization?

Gruß Uli
-- 
"Or have we eaten on the insane root,
 that takes the reason prisoner?"  -- MacBeth I, 3


--
[EMAIL PROTECTED] mailing list

Reply via email to