inlining with D
Sean Kelly
sean at f4.ca
Thu Jan 18 10:28:55 PST 2007
orgoton wrote:
> With C++ i used the "inline" keyword. How to I instrument the D compiler to
> inline a function? If it does this automatically, what are the criteria?
It does this automatically so long as the -inline flag it set when
compiling. Any function which has an available implementation at
compile-time is a candidate for inlining (ie. excluding a C-style
"header" module as an interface for a pre-compiled library). At the
moment, DMD will not inline delegates, functions containing loops, or
ASM code, but all are eventually candidates with compiler refinements.
Sean
More information about the Digitalmars-d
mailing list