Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2001:
[Freeciv-Dev] Warmap optimization (was Re: Exploring triremes getting lo
Home

[Freeciv-Dev] Warmap optimization (was Re: Exploring triremes getting lo

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: rf13@xxxxxxxxxxxxxxxxxxxxxx
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Warmap optimization (was Re: Exploring triremes getting lost)
From: Gregory Berkolaiko <gberkolaiko@xxxxxxxxxxx>
Date: Mon, 17 Sep 2001 11:51:53 +0100 (BST)

 --- Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx> wrote: 
> > diff -ur -Xfreeciv/diff_ignore freeciv/server/gotohand.c
> freeciv_mod/server/gotohand.c
> > --- freeciv/server/gotohand.c       Sun Sep 16 20:20:04 2001
> > +++ freeciv_mod/server/gotohand.c   Sun Sep 16 21:09:23 2001
> > @@ -182,6 +182,7 @@
> >        freelog(LOG_DEBUG, "returned before. getting next");
> >        return get_from_mapqueue(x, y);
> >      } else {
> > +      warmap.returned[*x][*y] = 1;
> 
> Why this change?

Right now warmap has a special field "returned" which is never changed
from it's initial zero value.  If my guess is correct, it's intended use
was to indicate that the node was already processed and, the way warmap
works, there is no possibility that processing it again will improve
anything.  So it should be used to avoid processing the same thing twice.

However when I added the above line and run some auto games, the
performance didn't change visibly.  The savegames were identical, which
is good.  Maybe I didn't have enough statistics...

I will do some more experiments with it.

G.

____________________________________________________________
Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie


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