CleverRaven/Cataclysm-DDA — pull request #2747 by gmcnew (2013-08-30 10:14:41+00:00)
Title: Performance: 3x speedup with 7000 active zombies

Precalculating friendly monsters speeds up monster::plan() dramatically, making game::do_turn() run in just 47% of its former time.

The sight modifier change is also pretty significant, making do_turn() take just 72% of its former time (assuming the friendly monster precalculation has already been applied).

Taken together, these changes reduce the execution time of do_turn() to 47% * 72% = 33.8% of its former time. A 7000-zombie game is nearly playable. =)