<div dir="ltr"><div class="gmail_extra">This will probably do, but I still don't understand why not a function attribute?</div><div class="gmail_extra"><br></div><div class="gmail_extra"><div class="gmail_extra">Will marking a function as inline notify the compiler that code should never be emitted to object files for that function?</div>
<div><br></div><div>Perhaps OT:</div></div><div class="gmail_extra">I've been playing with ranges a lot recently, and std.algorithm and friends, and I'm finding that using lambdas is real problem. They don't reliably inline, and the optimiser seems to have problems on occasion even when they do. (Perhaps they inline at the wrong stage?)</div>

<div class="gmail_extra">How can we have some guarantees about the inlining and inline-ability of trivial lambda's?</div><div class="gmail_extra">I'm very concerned about the performance of debug code when using something like filter!"condition", which results in a whole bunch of extra function calls per loop iteration.</div>

<div class="gmail_extra">I raised a thread recently about the idea of adding an additional optional argument to foreach to provide a filtering or termination condition, which if implemented by the language would have no overhead cost. The suggestion was to use filter!"", which sounds like a reasonable idea, but I'm really worried about the performance implications of using library primitives that produce a bunch of extra function calls on every loop cycle. I'm not sure these are practical when used in sufficiently trivial loops. Imagine I'm looping over a vertex array or an image or something, skipping over transparent pixels, or something like that... millions of iterations performing very trivial transformation, calling a bunch of functions every cycle.</div>
<div class="gmail_extra"><br></div><div class="gmail_extra"><div class="gmail_quote">
On 23 February 2014 22:07, Walter Bright <span dir="ltr"><<a href="mailto:newshound2@digitalmars.com" target="_blank">newshound2@digitalmars.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

<a href="http://wiki.dlang.org/DIP56" target="_blank">http://wiki.dlang.org/DIP56</a><br>
<br>
Manu has needed always inlining, and I've needed never inlining. This DIP proposes a simple solution.<br>
</blockquote></div><br></div></div>