4 ms·
That's an odd example, given most video games are written in memory managed languages for performance reasons. Typically an allocation pool would be used for th
by aschampion 10y ago
That's an odd example, given most video games are written in memory managed languages for performance reasons. Typically an allocation pool would be used for that case because there's some bound to the number of simultaneously allocated objects and each object has a homogeneous memory footprint.
It's also odd because you're replying to a well-known game designer.
That said, there are allocation-heavy workloads for which GC is well suited.
- wiz21c 10y ago>>> It's also odd because you're replying to a well-known game designer. Authority position ! :-) I worked on optimizing the Outcast game 3D engine (ok that was around 20 years ago). And I clearly remember other devs in the team struggling with memory allocation. In the end, they sorted it out without resorting to a full fledged GC. But since our case was simple (loading resources for building a world, then releasing resources that are not useful anymore), I concluded that it's not easy. In the end, it all depends on the nature of the problem, and one can optimize for any of them (as it is customary in video games). I know that.