forcing "@nogc" on class destructors

weaselcat via Digitalmars-d digitalmars-d at puremagic.com
Tue Jan 20 17:05:27 PST 2015


On Tuesday, 20 January 2015 at 23:47:44 UTC, Ola Fosheim Grøstad 
wrote:
> On Tuesday, 20 January 2015 at 23:17:28 UTC, deadalnix wrote:
>>> Concurrent GC is too expensive for a proper system level 
>>> language.
>>>
>>
>> That is an unsubstanciated claim.
>
> And so is «pigs can't fly».
>
> You want to run the collection when the GC-memory is hot in 
> caches. That basically means you want to run it right after you 
> have traversed the data structure. E.g. clean up dead long 
> lived objects after an iteration in a simulation.
>
> A concurrent GC will slow you down, push you out of (soft) real 
> time boundaries and keep dragging irrelevant stuff into the 
> caches.
>
> You want a fast and predictable GC that can fire often, not a 
> slow "interleaved one" (one way or the other you need to 
> compensate).

Strongly disagree, there is no silver bllet for memory and 
especially not for GCs.
I'd imagine a game developer would prefer a concurrent GC over a 
stop the world because it's better to run slightly slower than 
full freeze.


More information about the Digitalmars-d mailing list