[Gcl-devel] Re: sibling call optimization
Jim Wilson
wilson@specifixinc.com
Sat May 8 01:53:00 GMT 2004
Jim Wilson wrote:
> Overall, the -O3 code isn't really much worse than the -O2 code. In the
> O2 code, calling from LI2->LI1->LI2 involves two sibcalls. In the -O3
> case, the same sequence involves one regular function call. Note that
> LI2 is calling itself, not LI1. This is because LI1 was inlined into
> LI2. So it is possible that the -O3 code may actually be faster, even
> though it has calls instead of sibcalls.
Except if you are concerned about stack space usage, in which case the
single regular function call is much worse than two sibcalls. I was
only thinking about the speed of the code.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com
More information about the Gcc
mailing list