Do you think if statement as expression would be nice to have in D?
Walter Bright
newshound2 at digitalmars.com
Sun Jun 12 18:21:22 UTC 2022
On 6/12/2022 11:13 AM, Timon Gehr wrote:
> On 6/8/22 03:30, Walter Bright wrote:
>> The only structural problem with the backend I've discovered is it cannot
>> embed goto nodes in the tree structure, so it can't inline loops. I doubt it
>> is that big a problem, because loops intrinsically are hardly worth inlining.
>
> Inlining a function (even with a loop) can enable further optimizations that
> depend on additional information that's available at the call site.
I agree, and there are some cases where the improvement can be dramatic, but
there's just not a lot of oil in that well for loops.
More information about the Digitalmars-d
mailing list