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: undisclosed-recipients: ;
Subject: [Freeciv-Dev] Re: (PR#4636) make gotohand's local_vector denser
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 21 Jul 2003 08:50:18 -0700
Reply-to: rt@xxxxxxxxxxxxxx

Gregory Berkolaiko wrote:
> 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.

Err, you mean change the name?




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