inlining

JAnderson ask at me.com
Thu Jul 17 20:12:10 PDT 2008


bobef wrote:
> This has probably been asked many times before. If someone knows of such discussion please paste me a link. Why not an 'inline' attribute? We all know that the compiler can be stupid some times, and even if it is not people may want to inline something that is normally not appropriate for inlining. Auto inlining is fine, but people should have control over such kind of things I believe.
> 
> Regards, bobef

May C++ compilers ignore the inline attribute because it has a better 
handle on when to inline.  There have been some studies (does anyone 
have the links to these) where they've shown that most of the time the 
compiler can make a more intelligent guess then the average engineer.

But that's C++.  D does this automatic virtual's thing so its difficult 
to say whether the compiler can always make a good choice.

-Joel



More information about the Digitalmars-d mailing list