About ref used for performance reasons with struct

deadalnix deadalnix at gmail.com
Mon Feb 11 08:44:50 PST 2013


On Monday, 11 February 2013 at 15:48:32 UTC, Michel Fortin wrote:
> On 2013-02-11 06:52:28 +0000, "deadalnix" <deadalnix at gmail.com> 
> said:
>
>> When a function accept a struct, the compiler is free to use 
>> that function, or an altered one taking a reference as 
>> parameter.
>
> When designing the ABI, you can either create the copy on the 
> caller's side, or the callee's side. If I'm understanding well, 
> you want to have two versions of each function, one copying on 
> the caller's side, one copying on the callee's side,

That is blatantly wrong.

You don't have, the compiler is allowed to, and the copy on 
callee side isn't mandatory.


More information about the Digitalmars-d mailing list