On Monday, 6 March 2017 at 05:50:01 UTC, Rico Decho wrote:


Actually it's my case. I'd LOVE to use D for game development for instance, but I won't take the risk of having the GC pause the game when I don't want to, even for just an unknown amount of milliseconds, and even if I know that anyway I'll try to limit dynamic allocations by using caches etc.

It's *not* going to pause your game unless you do any allocations in your game loop, because it isn't otherwise going to run. D's GC is perfectly acceptable for games if you just follow the best practices that are already standard in game development. Allocate as much as you can when loading a new level and minimize allocations in the loop. If you do need to allocate during the level, you can avoid the GC entirely and do so via malloc. D provides the means to reduce or eliminate the impact of the GC in your critical loops. When developing games, you should already be trying to minimize allocations in those loops anyway.

Reply via email to