3 ms·
Same for games written i Java, by using pooling and not deallocating until a safe spot. Was especially important in early Android, where a GC break would not ju
by maaaats 9y ago
Same for games written i Java, by using pooling and not deallocating until a safe spot. Was especially important in early Android, where a GC break would not just feel like minor lag, but actally make a really big stutter.
- kevin_nisbet 9y agoI used object pooling as a technique to increase performance on some of the tools I wrote in my previous role. These were protocol analysis tools, used for monitoring network links, and it was an order of magnitude increase in performance by pooling most objects, and reducing the work of the GC. For performance critical code in a managed language, it made an astonishing difference, at least in my use case.
- 0xcde4c3db 9y agoSimilarly, many old C and assembly games just have static arrays for a sufficiently large number of each type and allocate from that using some simple scheme (e.g. slot count + compacting, bitmap, used/unused bit in the data structure itself, etc.).