Obviously, for me the intent WAS to reduce round time, which my profile results showed that I did (at least in my case), memory saving was just a benefit. It may have reduced it in some other place in some other case of course, but that doesn't mean it was a net loss. My intent is to continue profiling and fixing up other places where the performance is affected, but you have beaten me to it!Those really small memory usage reductions are really not worth it if the turn times increase.
Obviously, for me the intent WAS to reduce round time, which my profile results showed that I did (at least in my case), memory saving was just a benefit. It may have reduced it in some other place in some other case of course, but that doesn't mean it was a net loss. My intent is to continue profiling and fixing up other places where the performance is affected, but you have beaten me to it!
Yeah I'm not done yet it was just a first step.If it's possible try to avoid looping through getNumBuildingClassInfos() and searching something in a vector in every iteration. That will definitely be slower as just returning a bool from an array.