[Commits] [wesnoth/wesnoth] 82ee3e: Micro AIs: avoid using table.remove

GitHub noreply at github.com
Thu Apr 10 14:48:43 UTC 2014


  Branch: refs/heads/1.12
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 82ee3eeaf0446e1914d8a06ce1741eddaad7fa6e
      https://github.com/wesnoth/wesnoth/commit/82ee3eeaf0446e1914d8a06ce1741eddaad7fa6e
  Author: mattsc <mattsc000 at gmail.com>
  Date:   2014-04-10 (Thu, 10 Apr 2014)

  Changed paths:
    M data/ai/micro_ais/cas/ca_forest_animals_move.lua
    M data/ai/micro_ais/cas/ca_forest_animals_new_rabbit.lua
    M data/ai/micro_ais/cas/ca_goto.lua
    M data/ai/micro_ais/cas/ca_messenger_attack.lua
    M data/ai/micro_ais/cas/ca_simple_attack.lua
    M data/ai/micro_ais/cas/ca_swarm_move.lua
    M data/ai/micro_ais/cas/ca_wolves_multipacks_attack.lua
    M data/ai/micro_ais/cas/ca_wolves_multipacks_functions.lua

  Log Message:
  -----------
  Micro AIs: avoid using table.remove

It’s slow.  The inverse logic using table.insert is much faster,
especially for large tables.  Only kept table.remove in a couple places
where it doesn’t matter.

Conflicts:
	data/ai/micro_ais/cas/ca_messenger_attack.lua





More information about the Commits mailing list