[Freeciv-Dev] Re: [Patch] [RFC] Path finding version 14
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Mon, 16 Sep 2002, Raimar Falke wrote:
> On Mon, Sep 16, 2002 at 04:55:48PM +0100, Gregory Berkolaiko wrote:
> > On Mon, 16 Sep 2002, Raimar Falke wrote:
> >
> > > On Sun, Sep 15, 2002 at 07:21:58PM +0100, Gregory Berkolaiko wrote:
> > > > On Sun, 15 Sep 2002, Gregory Berkolaiko wrote:
> > > >
> > > >
> > > > And the last version of the patch. First it makes one test run for all
> > > > units, both PF algorithms are used and if a difference in results is
> > > > detected, the whole thing aborts. Then 100 runs of each algorithm for
> > > > each unit are done and the times are printed.
> > > >
> > > > Usage:
> > > > 1. Apply the patch to latest CVS.
> > > > 2. Load the attached game, connect, start and press Turn Done.
> > > > 3. Watch the output in the server screen.
> > >
> > > Patch from x2 to x3 attached.
> >
> > Patch from x3 to x4 is attached. Several mistakes fixed. Added support
> > for sea-going (non-sinking) and IGTER units.
> >
> > Savegame runs smoothly, apart from occasional non-unique path with a given
> > COP hiccup.
>
> > GB_pf is at least 2 times faster than RF_pf. Hopefully this settles
> > the choice of implementation.
>
> Mhhh. This is odd. Both use exactly the same amount of external
> functions. Lets see if you have implemented all functionality
> (move_backward, ignore_enemy, goto_move_restriction and
> is_position_dangerous). This should at least add some ifs in the hot
> path (or an extra call in the is_position_dangerous case). We should
> maybe also run some tests if asserts disabled.
move_backward and goto_move_straightest will be implemented through COSTFN
callbacks.
I thought we agreed that ignore_enemy is the default behaviour and not
ignoring enemy will be done through tile_behaviour.
I don't think one call is so important. In fact I just added an extra
wrapper on top of pf_next and removed some macro-associated cruft from
your code. The results change but not by much, the speedup is still
greater than 2. ZOC will bring it down a bit, but again not
significantly.
Compiling without asserts will change it much more, in all likelyhood.
Can you try it please?
G.
- [Freeciv-Dev] Re: [Patch] [RFC] Path finding version 14, (continued)
- [Freeciv-Dev] Re: [Patch] [RFC] Path finding version 14, Raimar Falke, 2002/09/16
- [Freeciv-Dev] Re: [Patch] [RFC] Path finding version 14, Gregory Berkolaiko, 2002/09/15
- [Freeciv-Dev] Re: [Patch] [RFC] Path finding version 14, Gregory Berkolaiko, 2002/09/15
- [Freeciv-Dev] Re: [Patch] [RFC] Path finding version 14, Raimar Falke, 2002/09/16
- [Freeciv-Dev] Re: [Patch] [RFC] Path finding version 14, Gregory Berkolaiko, 2002/09/16
- [Freeciv-Dev] Re: [Patch] [RFC] Path finding version 14, Raimar Falke, 2002/09/16
- [Freeciv-Dev] Re: [Patch] [RFC] Path finding version 14, Gregory Berkolaiko, 2002/09/16
- [Freeciv-Dev] Re: [Patch] [RFC] Path finding version 14, Raimar Falke, 2002/09/16
- [Freeciv-Dev] Re: [Patch] [RFC] Path finding version 14, Raimar Falke, 2002/09/16
- [Freeciv-Dev] Re: [Patch] [RFC] Path finding version 14, Gregory Berkolaiko, 2002/09/16
- [Freeciv-Dev] Re: [Patch] [RFC] Path finding version 14,
Gregory Berkolaiko <=
- [Freeciv-Dev] Re: [Patch] [RFC] Path finding version 14, Raimar Falke, 2002/09/16
- [Freeciv-Dev] Re: [Patch] [RFC] Path finding version 14, Gregory Berkolaiko, 2002/09/16
- [Freeciv-Dev] Re: [Patch] [RFC] Path finding version 14, Raimar Falke, 2002/09/16
- [Freeciv-Dev] Re: [Patch] [RFC] Path finding version 14, Gregory Berkolaiko, 2002/09/21
|
|