3 ms·
And in Unity3d, the GC is actually very problematic. For complex games, you need to focus on zero-allocation or there will be noticeable pauses. (See Kerbal Spa
by jakevn 10y ago
And in Unity3d, the GC is actually very problematic. For complex games, you need to focus on zero-allocation or there will be noticeable pauses. (See Kerbal Space Program) Object pooling is the way to go here.
- pjmlp 10y agoA consequence of a pre-historic Mono implementation.
- nightski 10y agoI don't know if "problematic" is the right word seeing as even with manual memory management you have to do the same techniques. The problem is with allocation/destruction in general within the core loop.
- yoklov 10y agoIt's more problematic in languages that encourage allocation since you have to work more to avoid it. I've done game development in C++, C#, and JS, and I had to worry about memory management far more in JS than in C# or C++, simply because even something as innocent as adding two vec3s requires you come up with a space for the result first, if you want to avoid gc hitches. C#'s struct types help here, but it still has plenty of its features increase GC pressure.