This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: std::pow implementation


> 
> Suggesting that a programmer must only use inline when they are convinced 
> that better code will always result (ie that using inline when it may only 
> sometimes produce better code is "dangerous") sounds even more like 
> spreading FUD to me.  You're going to get people saying "Never use inline, 
> it can make your code worse".

I think one reason that the treatment of inline has been much more successful
in Ada than in C++ (at least in the gcc environment) is precisely that Ada
programmers are very used to using inline extensively, and assuming that
the compiler will pay significant attention to their input. In fact we find
that -O3 often damages performance in Ada, since the programmer has done
a pretty good job of selecting what needs inlining.

So anything that discourages the use of the inline directive is unfortunate


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]