dip1000 and preview in combine to cause extra safety errors
Paulo Pinto
pjmlp at progtools.org
Tue Jun 14 09:30:35 UTC 2022
On Tuesday, 14 June 2022 at 09:23:36 UTC, forkit wrote:
> On Tuesday, 14 June 2022 at 07:34:29 UTC, Paulo Pinto wrote:
>> [...]
>
> I expect the compiler to be smart in helping me ;-)
>
> In yet another example, the argument that 'less instructions
> are needed to allocate on the heap vs the stack', does not hold
> up to further scrutiny (at least in this optimised example).
>
> https://d.godbolt.org/z/E85hWrocM
>
> Presumably, the more complex the type of allocation be
> requested, the more difficult it is for the optimiser to
> optimise that request, and so you do in fact end up with more
> instructions for heap allocation. That is the only explanation
> I can come up with ;-)
>
> But i leave further analysis to another thread ;-)
Now you asked for too little help, with -O3 it is the same,
https://d.godbolt.org/z/M41EKvdT1
More information about the Digitalmars-d
mailing list