Inline Functions

Walter Bright newshound1 at digitalmars.com
Wed Feb 25 00:26:52 PST 2009


Tomas Lindquist Olsen wrote:
> perhaps a verbose mode could be added in dmd that prints the pretty
> printed declaration when a function is inlined. then it would be a
> simple grep to make sure.
> 
> dmd -vi foo.d | grep 'foo\.inc'
> 
> telling people to inspect the obj2asm output seems to be popular, but
> it's hardly user friendly.

I know, but it isn't that hard, either, even if you don't know 
assembler. If the "call" isn't there, it likely got inlined.

Also, if you are trying to optimize the code by trying various tweaks at 
the statement level, it's much like shooting skeet blindfolded if you 
don't look at the asm output. It's time consuming and unlikely to be 
successful.



More information about the Digitalmars-d mailing list