3 ms·
The usage of a GC changes the nature of the solution entirely. Say you wanted to write a bullet hell game. Spawning bullets/spells in the thousands takes pretty
by banachtarski 9y ago
The usage of a GC changes the nature of the solution entirely. Say you wanted to write a bullet hell game. Spawning bullets/spells in the thousands takes pretty careful management and without memory management, understanding where you've leaked or why memory isn't being reclaimed when you expect can be nightmarish.
- pjmlp 9y agoSame applies to malloc()/new, no one on their right mind would be allocating during the hot path of rendering loop. With GC languages, one just needs to learn about value and reference types, and which language features might implicitly allocate. Which can be helped via static analysis. Regarding .NET specifically, there are quite a few ways of doing manual memory management, although not as fine grained as C++, which many devs seem to be completely unaware of. In both scenarios, using a profiler is a must have for anyone caring about performance. And lets be real, unless one is competing with AAA level games, there is a big spectrum of game styles that don't need the ultimate hardware performance, just good enough for an enjoyable game experience.