Follow-up Comment #5, patch #1033 (project wesnoth):

Parsing unit list would almost always be faster, as it gets rid of the slow
find in the inner loop. Even in the example you gave it is likely that
parsing the unit list would be faster.

As an estimate, it's probably faster to check ~5-10 units just iterating
through the unit list than it is to call find() once.

Just something to consider.

    _______________________________________________________

Reply to this item at:

  <http://gna.org/patch/?1033>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


_______________________________________________
Wesnoth-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-bugs

Reply via email to