[Freeciv-Dev] Re: [RFC] square_dxy_iterate
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Fri, Feb 22, 2002 at 06:04:45PM -0500, Jason Short wrote:
> 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.
Ok.
> Another question to think about here is whether the algorithm of
> invasion_funct can be improved.
Indead. See attached patch.
Raimar
--
email: rf13@xxxxxxxxxxxxxxxxx
"- Amiga Y2K fixes (a bit late, wouldn't you say?)"
-- Linus Torvalds about linux 2.4.0 at 4 Jan 2001
invasion_funct1.diff
Description: Text document
- [Freeciv-Dev] [RFC] square_dxy_iterate, Raimar Falke, 2002/02/22
- [Freeciv-Dev] Re: [RFC] square_dxy_iterate, Jason Short, 2002/02/22
- [Freeciv-Dev] Re: [RFC] square_dxy_iterate,
Raimar Falke <=
- [Freeciv-Dev] Re: [RFC] square_dxy_iterate, Gregory Berkolaiko, 2002/02/23
- [Freeciv-Dev] Re: [RFC] square_dxy_iterate, Raimar Falke, 2002/02/23
- [Freeciv-Dev] Re: [RFC] square_dxy_iterate, Gregory Berkolaiko, 2002/02/23
- [Freeciv-Dev] Re: [RFC] square_dxy_iterate, Raimar Falke, 2002/02/23
- [Freeciv-Dev] Re: [RFC] square_dxy_iterate, Gregory Berkolaiko, 2002/02/23
- [Freeciv-Dev] Re: [RFC] square_dxy_iterate, Raimar Falke, 2002/02/23
- [Freeciv-Dev] Re: [RFC] square_dxy_iterate, Gregory Berkolaiko, 2002/02/23
- [Freeciv-Dev] Re: [RFC] square_dxy_iterate, Petr Baudis, 2002/02/23
- [Freeciv-Dev] Re: [RFC] square_dxy_iterate, Raimar Falke, 2002/02/23
- [Freeciv-Dev] Re: [RFC] square_dxy_iterate, Petr Baudis, 2002/02/23
|
|