Do you use D's GC?
John Colvin
john.loughran.colvin at gmail.com
Tue Aug 3 18:03:43 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.
I think GC fear is massively overblown, but I would be quite
careful about using it heavily in a 3D game. Unpredictable pauses
are your enemy. So using it to load/build e.g. level assets would
be fine, but allocating anything short-lived? No way. I would
likely make the core game loop @nogc or be very strategic in
allowing it to run.
Then again, I have never build a 3d game before, only 3d
scientific animations, so my advice is coming from a relatively
weak position: I know D very well and have heard how games work.
More information about the Digitalmars-d
mailing list