Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2002:
[Freeciv-Dev] Re: [RFC] square_dxy_iterate
Home

[Freeciv-Dev] Re: [RFC] square_dxy_iterate

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: [RFC] square_dxy_iterate
From: Jason Short <vze2zq63@xxxxxxxxxxx>
Date: Fri, 22 Feb 2002 18:04:45 -0500
Reply-to: jdorje@xxxxxxxxxxxx

Raimar Falke wrote:
From the profile of an autogame (with disabled CHECK_MAP_POS):
Flat profile:


80695222/2379222=33.916 calls of normalize_map_pos for each call of
invasion_funct. It turns out that square_dxy_iterate is the
problem. And the second one (is_terrain_near_tile) uses adjc_iterate.

Are there any is_border patches or similar handy which solve this?

Ross's corecleanups (kindof) extend the IS_BORDER_POS check to check for arbitrary (map_dist) distances from the border. Under the current topology this is easy; under others it will be less so (but still doable, plus our definition that IS_BORDER_POS(..)=>FALSE means the position may or may not be on the border gives us a good default option). I'll put together a patch sometime this weekend, I suppose - it should be quite short.

Another question to think about here is whether the algorithm of invasion_funct can be improved.

jason



[Prev in Thread] Current Thread [Next in Thread]