3 ms·
> D's garbage collector can be switched off, but last I checked (to be fair a few years ago) this even locked you out of parts of the stdlib. For smaller game e
by earenndil 9y ago
> D's garbage collector can be switched off, but last I checked (to be fair a few years ago) this even locked you out of parts of the stdlib. For smaller game engine projects, this is an issue. For larger ones, they often rewrite the stdlib anyway, though I'd expect growing pains while bootstrapping up to that point.
Yeah, that is a problem -- albeit one that people are currently working on fixing. Look at BetterC[1]. And I've heard rumours someone is rewriting the GC to be much more performant? And if nothing else, you can just stop the GC and manually collect your own memory, and a smart pointer implementation is probably relatively simple.
However, is the GC even a problem? You know what they say about premature optimization.
1: https://dlang.org/spec/betterc.html https://dlang.org/spec/betterc.html
- reificator 9y agoI've spent enough time writing games in various GCed languages, and GC has been an issue in all of them. It's less about the optimization of the actual pause time and more about trying to make sure that things are as deterministic as possible for debugging's sake. Though the pause is of course an issue as well.