[Freeciv-Dev] Re: Performace of path-finding (PR#2370)
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Thu, 13 Mar 2003, Raimar Falke wrote:
> On Thu, Mar 13, 2003 at 05:00:08PM +0000, Gregory Berkolaiko wrote:
> > I removed the unneccesary TB-callback to put gotohand and new PF on the
> > same level. What I didn't do is to introduce cutoff of iterations after
> > certain threshold move-cost is exceeded (like done in generate_warmap).
> > This explains the drastic change in times: buggy.sav.gz has much larger
> > continents and PF module doesn't stop until whole continent is covered by
> > the map.
> >
> > Anyway, here's what I got.
> >
> > Wed, 12 Mar 2003, Raimar Falke wrote:
> >
> > > Another one (buggy.sav.gz):
> > > 2: gotohand=8,890000s path_finding=23,570000s factor=2,651294
> > > 2: gotohand=8,770000s path_finding=23,660000s factor=2,697834
> >
> > 2: gotohand=232.790000s path_finding=299.770000s factor=1.287727
> >
> > > A third (caravan_cma.sav.gz):
> > > 2: gotohand=13,650000s path_finding=16,470000s factor=1,206593
> > > 2: gotohand=13,780000s path_finding=16,400000s factor=1,190131
> >
> > 2: gotohand=37.560000s path_finding=21.570000s factor=0.574281
> >
> > Conclusions:
> > 1. In similar conditions PF outperforms old gotohand.c code (a great
> > surprise to me, I actually suspect something is wrong).
>
> Same here. These numbers are too good. We have to compare the MC of
> the tiles. And check the number of iterations.
I did some rather random testing, patch attached. It seems to work (if
you use the patch on a savegame different from caravan_cma, you might need
to change the hardcoded coordinates, as they can fall in the sea).
Also, the relative speed varies a lot, for unknown reason, but for me it
seems to saturate at 0.74. The increase from previous ratio is due to the
calls to pf_next_get_position.
Please do more testing, I am a bit busy this weekend.
> > 2. Raimar's computer is way faster then mine.
>
> I changed to N=100 for the first game to N=10 for the second because
> it took to long.
Ah, ok.
G.
pf_test.diff
Description: Text document
|
|