[Freeciv-Dev] Re: Unused field in move_cost_map removed. (PR#965)
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Tue, Sep 18, 2001 at 12:39:32PM +0100, Gregory Berkolaiko wrote:
> I did some experimenting with the returned field of move_cost_map (aka
> warmap),
> http://www.freeciv.org/lxr/source/server/gotohand.h?v=cvs#L38
>
> It's intended use was to indicate to the warmap generator that a location
> has already been processed. However, by virtue of Dijkstra's algorithm,
> such an occurence is quite rare. This is probably the reason why it is
> not quite used (although initialised) in the currecnt code.
I looks like I miss something here: returned is malloc'ed, memset'ed
and tested but NEVER set. So the this variable is useless. If you also
come to this conclusion I don't understand why you made test runs?
> I tried following things: check for "returned" disabled (that's current
> code),
Ok.
> check enabled
So what you think is the correct usage of this field?
> and also plain removing all mentions of this
> "returned" field. The savegames from the runs were identical in all
> cases
> (expected)
You mention above that such "occurence is quite rare".
> . The results of timing the test runs were:
> If I interpret the results correctly (looking at u time), enabling the
> check sometimes gives an improvement;
> removal of the field gives stable although little improvement, it also
> reduces volume of the code and memory used, so I suggest that it should
> be applied to CVS asap.
In its current form it is useless. I also vote for removing. (Mhh this
is the second code construct in server/gotohand.[ch] which has no
effect).
Raimar
--
email: rf13@xxxxxxxxxxxxxxxxx
1 + 1 = 3, for large values of 1
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] Re: Unused field in move_cost_map removed. (PR#965),
rf13 <=
|
|