I am looking at how to speed up OpenXCOM on very large battlescapes (because those are the most fun!) with large populations of AI actors (about 154 civilians, some large but uncertain number of Aliens) for terror missions.
Firstly, its really slow in the Alien turn. Minutes per AI turn.
Some observations: it never seems to peg the (or a) CPU at 100%. Perhaps timer driven actions with idle periods? The structure of the game loop is still opaque to me ;-)
I ran the OSX "Instruments" profiler over this. One hotspot showing up is the volume of memory allocations performed (huge) despite the relatively small overall memory usage. I have greatly reduced one instance of this pattern of quickly allocating, and then deleting, objects - in a case where the allocation is not (usually) needed, it can be avoided unless needed.