What should happen here?

max haughton maxhaton at gmail.com
Sun Sep 26 20:27:40 UTC 2021


On Sunday, 26 September 2021 at 19:13:57 UTC, deadalnix wrote:
> On Friday, 24 September 2021 at 15:31:46 UTC, Steven 
> Schveighoffer wrote:
>> On 9/24/21 11:25 AM, deadalnix wrote:
>>> On Thursday, 23 September 2021 at 19:54:56 UTC, Steven 
>>> Schveighoffer wrote:
>>>> You can. But wouldn't you prefer just pushing something on 
>>>> the stack?
>>>>
>>> 
>>> Not really. If the optimizer can remove dead stack pushes, 
>>> then program will become 2x slower instantly in addition of 
>>> consuming more stack memory.
>>> 
>>
>> You think pushing on the stack is going be 2x slower than 
>> calling `GC.addRoot`?
>>
>> -Steve
>
> If the optimizer isn't free to optimize thing away from the 
> stack, yes, it's pretty much guaranteed.

Zen3 can actually promote a spill onto the stack into its 
physical register file.


More information about the Digitalmars-d mailing list