June 12, 2022 Re: Do you think if statement as expression would be nice to have in D? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Timon Gehr | 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.
|
Copyright © 1999-2021 by the D Language Foundation