@gc attribute for bypassign @nogc

Dicebot via Digitalmars-d digitalmars-d at puremagic.com
Sun Jul 24 16:33:46 PDT 2016


On Sunday, 24 July 2016 at 23:30:37 UTC, bitwise wrote:
> On Sunday, 24 July 2016 at 23:10:18 UTC, Dicebot wrote:
>> @nogc functions must never ever trigger GC collection cycle, 
>> not under any possible circumstances. Otherwise the attribute 
>> serves no purpose.
>
> The fact that you can use malloc() in a @nogc function 
> invalidates this argument.

malloc is not even on the same order of magnitude of impact as 
GC. @nogc is primarily about latency and preventing unwanted stop 
the world cycle, not about performance or allocation count per se.



More information about the Digitalmars-d mailing list