CleverRaven/Cataclysm-DDA — pull request #9927 by kevingranade (2014-11-09 03:25:50+00:00)
Title: Performance enhancements for release

This is a little all over the place, basically I profiled with a huge (10,000) number of zombies surrounding me, and fixed the bottlenecks that showed up.
In particular these are things that happen one or more times for each monster on the map, so having all those monsters active made it readily apparent where the problems were.
For this incredibly contrived corner case, performance seems to have improved by 3-5 fold, possibly more. If you have spawn rates set ridiculously high, you might see large benefits from this.