On 16 March 2012 19:53, Timon Gehr <timon.g...@gmx.ch> wrote:

> On 03/16/2012 06:33 PM, Manu wrote:
>
>> On 16 March 2012 18:37, Andrei Alexandrescu
>> <seewebsiteforem...@erdani.org 
>> <mailto:SeeWebsiteForEmail@**erdani.org<seewebsiteforem...@erdani.org>
>> >>
>>
>> wrote:
>>
>>    Actually, as has been mentioned, swizzling can be done very nicely
>>    inside the language.
>>
>>
>> How?
>>
>
> Use opDispatch.
>
> a = a.yxwz;


The simplest possible example (I've done this is std.simd)... but if I have
a few different loosely related things?
My personal most frequent problem case is collision/physics. pos, 't',
velocity, intersectionFlag, intersection target pointer, etc.. lots of
loosely related stuff, always results in inefficient function calls in some
of the hottest code in the engine.


DMD does that for you (Walter is the inventor of NRVO).
>

Which is awesome for returning larger structs, but not good for returning
just a couple of unrelated things that will persist as locals in the
calling function.

Reply via email to