Reference value of structs not optimized or inlined?

Bill Baxter wbaxter at gmail.com
Fri Aug 28 17:39:07 PDT 2009


On Fri, Aug 28, 2009 at 3:21 PM, Brad Roberts<braddr at puremagic.com> wrote:
> On Fri, 28 Aug 2009, Bill Baxter wrote:
>
>> On Fri, Aug 28, 2009 at 1: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.
>>
>> Wow.  That's it?  So let's get it done already!  This is really a
>> shame to have this hanging around in a language whose biggest selling
>> point over the competition is speed.   It's been shown many times that
>> DMD's failure to inline ref args has significant impact (~10%) on the
>> performance of numerical code.  If you can easily give these kinds of
>> code a 10% boost without too much effort then that's a big win in my
>> opinion.
>>
>> --bb
>
> Ok.. so we should expect a patch from you sometime soon?  You did include
> yourself in the 'us' inside "let's", right?

I'm actually surprised Don hasn't jumped on this one, given that it's
primarily numerical code that it seems to be affecting.   If I were
still at my old job using D heavily,  I would probably take a whack at
fixing this one, just because it has been such an annoyance to me.   I
put up with it figuring it would be fixed someday, and I assumed there
must be something tricky about it or else it would have been done
already.  But given Walter's answer just now, it sounds like a quick
fix for him or someone else familiar with the compilers internals.

--bb



More information about the Digitalmars-d mailing list