Game.creeps.filter vs. room.find (FIND_MY_CREEPS)
-
Which is a more effective way to find all creeps in a room: filtering
Game.creepsor usingroom.find (FIND_MY_CREEPS)?
-
Room.findis optimized for searching in the specified room only, andGame.creepscontains all creeps within all accessible rooms. If you have many rooms,Room.findis definitely faster.