[Exceptional C++ Style] Exception C++ Style - Item 25:inline Redux.

Adrian Fagg adrianf at evaluategroup.com
Fri Jan 28 05:58:25 EST 2005


> -----Original Message-----
> From: effective-cpp-bounces at accu.org
> [mailto:effective-cpp-bounces at accu.org]On Behalf Of Atul_Khot at i2.com

> > Ahem. Not unconditionally, I think. Sure, it has more
> information to make
> > the decision at that point, but e.g. link-time inlining is _not_
> equivalent
> > to compile-time inlining. With compile-time inlining, inlining the
> function
> > call leads to longer stretches of code available to the
> optimiser, and
> this
> > may result in a more dramatic improvement than simply the inlining
> itself.
>
> I would not worry about all this. ( Or should I? )

Only if you're a compiler implementer, or if you have to tweak compiler
settings, but even then trial and error is the best approach.
Double guessing the impact of inlining is one of the more futile pastimes
that could occupy one's mind, IMO.

I agree with Terje that the ideal time for the system to inline isn't
*necessarily* the latest possible.


Regards,

Adrian

Work: mailto:adrianf at evaluategroup.com
Home: mailto:adrian.fagg at ntlworld.com

Pretty pictures: http://homepage.ntlworld.com/rbyadf/




More information about the Effective-cpp mailing list