3 ms·
Unity/Unreal, devs who work with both engines complain about the GC, it never was something that made them pick the engine specifically When you dig into proje
by WhereIsTheTruth 3y ago
Unity/Unreal, devs who work with both engines complain about the GC, it never was something that made them pick the engine specifically
When you dig into projects, you realize that most of the time people do extra work to work around the GC (pooling, arena allocation)
GC is nice to have but is _very_ task specific
Anyone who sells a GC as a universal solution is clueless and is dangerous
At 120fps, your frame budget is only 8ms, you don't have time to waste on GC related tasks, in fact, you don't want to do any kind of heap allocation or anything that might introduce any form of hiccups during gameplay (no JIT as well)
- pjmlp 3y agoLikewise people that usually use the GC as escape goat for not writing proper code in first place, like using the language features for allocation free code. Those are the same folks that do memory allocation in C during frame rendering, with the compiler provided malloc()/free() lousy for multithreaded game code, while complaining about the GC. Summary, complaining only allowed to those that actually master the toolbox.
- spacechild1 3y ago> At 120fps, your frame budget is only 8ms What a luxury :) In audio code the budget can be as low as 1.5 ms. And you can hear every time you miss the deadline.
- kaba0 3y ago8ms is a shitton of time, though, especially with modern, low-latency GCs.
- WhereIsTheTruth 3y agoIt's time for your other systems, wasting 1ms is already too much low-latency is not free But again, don't just take my words, ask game developers who use both Unity/Unreal, and ask them why they are forced to work around the GC ;) Look at the modern AAA released this year, they already struggle CPU wise
- kaba0 3y agoUnity doesn’t use a fancy GC, though. Also, that is more than likely just bad game logic on their part — the engine itself doesn’t use GC, most of the objects are not supposed the be on the heap.
- WhereIsTheTruth 3y agoExactly, that's my whole point, GC should not be sold as a universal solution, it's very task specific
- kaba0 3y agoI would argue that not using a GC is very task-specific. Besides some audio-system, I really have a hard time thinking of areas where my go-to wouldn’t be a managed language.