"Dave Carrigan" <[EMAIL PROTECTED]> wrote in message
news:30600@palm-dev-forum...
>
> Laurence Lundblade <[EMAIL PROTECTED]> writes:
>
> > - Inlining is great for reducing code size
>
> Hmm, do you have quantitative data to support this? I've always thought
> that inlining would typically increase speed, but at best would keep
> code size the same, and probably increase it, depending on the size of
> the inlined function, and the number of times it is called.

Inlining with optimization can really help, for very small functions.  If
the code required for making the call is larger than the functionality, you
get smaller code.  If you've only got one call to a function, you also get
smaller code.  Inlined code can also be optimized more because you have the
context of the calling function.

In general, its a case-by-case thing.  One problem with inlining on the Palm
with CW is local variables -- CWPalmOS doesn't do stack coloring yet, so if
a variable can't fit into a register, it will get a unique offset on the
stack, which leads to much larger stack usage than necessary.



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to