3 ms·
When latency matters, just use pool allocation, which makes the GC irrelevant.
by TylerE 13y ago
When latency matters, just use pool allocation, which makes the GC irrelevant.
- pcwalton 13y agoPools are still traced.
- spullara 13y agoIf you pool everything, the GC never runs and tracing is irrelevant. However, getting to there is very difficult. Better is to just make sure you throw almost everything away before the next GC, have a small permanent runtime set of objects and accept 10-20ms stop the world young gen collections.
- deleted 13y ago[deleted]
- klausa 13y agoTargeting 30fps, you have 33ms to render whole frame. Losing 20 ms of that to GC would make things… challenging. And if you're targeting 60fps, that's 16ms. Stop the world for 20ms, and you've missed 1 and 1/4 of a frame.
- spullara 13y agoThere are concurrent collectors that do not stop the world (e.g. Azul's) that you might want to look at for game development.
- fhd2 13y agoThat's how people manage to make games despite GC, but I always thought it's a huge hack, having been there. If all you do with your GC is fight it, is it actually a good idea to have it? One thing that makes me excited about Rust is that GC is optional.