Boost logo

Boost :

From: Terje Slettebø (tslettebo_at_[hidden])
Date: 2002-10-24 23:46:59

>From: "Beman Dawes" <bdawes_at_[hidden]>

>At 08:33 AM 10/24/02, Terje Slettebø wrote:

> >Yes, but you loose the chance to inline. The compiler can typically only
> >inline at compile-time what is in header files. This means that to get
> >inlining, you have to select which, if any, functions to inline, and put
> >them in the header.

>That has certainly been 100% true historically.

>Do be aware that linkers are now starting to do code based inlining, so it
>won't always be true in the future.

Yes, I'm aware of that, which is why I said _inline at compile-time_. :) As
I understand, the MSVC.NET compiler can do link-time inlining. However, as
was pointed out when this was discussed in another thread, this doesn't give
the same effect as compile-time inlining. In particular, if it does the
inlining at compile-time, it may be better at doing optimising, because it
has the whole context available. Inlining isn't just about removing function
calls, but not at least that the optimiser typically does better on longer
runs of linear code, such as when doing register allocation, etc.

Thus, link-time inlining really isn't necessarily a replacement for
compile-time inlining, as it may be too late at this point to do the



Boost list run by bdawes at, gregod at, cpdaniel at, john at