Reference value of structs not optimized or inlined?

Bill Baxter wbaxter at gmail.com
Fri Aug 28 17:42:12 PDT 2009


On Fri, Aug 28, 2009 at 5:01 PM, Ary Borenszweig<ary at esperanto.org.ar> wrote:
> Walter Bright escribió:
>>
>> Jarrett Billingsley wrote:
>>>
>>> On Fri, Aug 28, 2009 at 4:20 PM, Walter
>>> Bright<newshound1 at digitalmars.com> wrote:
>>>>
>>>> Jarrett Billingsley wrote:
>>>>>
>>>>> You're addressing the 'const' issue, but you haven't addressed the
>>>>> OP's issue: that 'ref', for whatever reason, prevents inlining. Const
>>>>> aside, why is this so?
>>>>
>>>> Because I never updated the inlining code to handle it.
>>>
>>> Well I'm glad it's that simple, and I'm sure Jeremie is too ;)
>>
>> There are a lot of D specific optimization opportunities that are left
>> undone for now.
>
> Why?
>
> Seeing D as "a systems language with features form high-level languages but
> without the performance penalty so you can prefer it over C/C++/Java/C#
> etc.", if D's performance isn't that good then there's not much competition
> for people coming from either sides that expect high performance.
>
> bearophile and others from time to time complain about performance issues in
> D, just because D promises performance. I think this is more important that
> adding more features that won't give you higher performance.
>

I think it's perfectly justified to put off optimizations that are
tricky or only pay off in odd circumstances.   But from Walter's
comment it sounds like this one shouldn't be any harder than enabling
the pointer inlining path for ref args too.  And the payoff would be
decent.

--bb



More information about the Digitalmars-d mailing list