Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] A semi-related question



On 4/22/05, Kenneth <emry@example.com> wrote:

> > I think that you are right about g++, but not about gcc. I think gcc
> > always honours "inline" when you turn on optimisation:
> 
> I don't use inline much personaly anyway. Then again my current
> programming skill is very minimal. ^^;

In general, this is the correct approach. In all but the most extreme
cases, the compiler knows better than you when something should be
inlined.

Of course, when you do a lot of systems programming, over time, you
encounter a lot of the corner cases where inlining something can make
your subsystem an order of magnitude faster, but the compiler does not
realise it. *That* is when you use the inline keyword.

Cheers,
Josh


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links