Do you use D's GC?
Gregor Mückl
gregormueckl at gmx.de
Tue Aug 3 09:15:57 UTC 2021
On Sunday, 1 August 2021 at 08:54:05 UTC, Kirill wrote:
> It's interesting to hear do you use D's GC? Or do you use your
> own custom memory management structure?
>
> How performant is GC?
>
> The reason I'm asking is I'm planning to dive into 3D game dev
> with D as a hobby in an attempt to create a game I dreamed of
> since I was a kid. I'd like to know if GC is worth using at
> all, or should I go with 100% manual memory management.
>
> Any opinion is appreciated. Thanks in advance.
The D garbage collector seems reasonable for applications with
small (object sized) allocations. But that changes when you
allocate large blocks of memory: due to a bug internal to the
tracking of allocated pages, performance gradually degrades over
time. So if you have to allocate large(ish) buffers regularly,
it'll show over time. I reported that bug here with a repro case,
but it didn't get any attention yet:
https://issues.dlang.org/show_bug.cgi?id=20434
I haven't managed to understand thag part of the GC enough to
submit a patch myself :(.
More information about the Digitalmars-d
mailing list