Efficient way to pass struct as parameter

Cecil Ward d at cecilward.com
Thu Mar 15 23:20:13 UTC 2018


On Thursday, 15 March 2018 at 23:15:47 UTC, Cecil Ward wrote:
> On Thursday, 15 March 2018 at 23:14:14 UTC, Cecil Ward wrote:
>> On Tuesday, 2 January 2018 at 18:21:13 UTC, Tim Hsu wrote:
>>> [...]
>>
>> U
>
> or even 'I' will be delighted to take a look.

Also link time optimisation and whole program optimisation might 
be your friends if you are having problems because module 
boundaries mean that the compiler cannot expand the source code 
of the constructor implementation to inline it and fully optimise 
it away to nothing.

You certainly should have no problems if the code that uses the 
struct can see the struct definition's actual source text 
directly.



More information about the Digitalmars-d-learn mailing list