Complete.Org: Mailing Lists: Archives: freeciv-dev: July 2003:
[Freeciv-Dev] Re: (PR#4636) make gotohand's local_vector denser
Home

[Freeciv-Dev] Re: (PR#4636) make gotohand's local_vector denser

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jdorje@xxxxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#4636) make gotohand's local_vector denser
From: "Gregory Berkolaiko" <Gregory.Berkolaiko@xxxxxxxxxxxx>
Date: Mon, 21 Jul 2003 08:48:02 -0700
Reply-to: rt@xxxxxxxxxxxxxx

On Mon, 21 Jul 2003, Jason Short wrote:

> find_the_shortest_path in server/gotohand.c has a static variable 
> local_vector, a 2d array with dimensions MAP_MAX_WIDHT * MAP_MAX_HEIGHT.
> 
> This is inefficient not only because of the wasted memory, but because 
> the inferior cache usage slows things down.
> 
> The correct thing to do - and what is done everywhere else - is to make 
> this value a 1d array indexed by index positions.

While you are at it, please convert local_vector to bit-vector.

G.




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