Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2001:
[Freeciv-Dev] Re: freeciv2 kernel,modules and rulesets
Home

[Freeciv-Dev] Re: freeciv2 kernel,modules and rulesets

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: rf13@xxxxxxxxxxxxxxxxxxxxxx
Cc: Andrew Sutton <ansutton@xxxxxxx>, Petr Baudis <pasky@xxxxxxxxxxx>, freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: freeciv2 kernel,modules and rulesets
From: julian.rueth@xxxxxx (Julian Rüth)
Date: 03 Dec 2001 14:05:10 +0100

Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx> writes:
>  1) current situation: deref a pointer of the tile and go trough the
>  short (<7) list; costs 4 bytes per tile
>  2) proposed solution: go through all units (this can be hundreds) and
>  select the units you want; costs 0 bytes per tile
> 
> We can afford these 4 bytes per tile. Max size is 200x100 ==
> 200*100*4=80k.
>       Raimar
I don't think this is a real problem. Just put all the units in some kind of 
tree (ordered by x and y positions) so it costs only something like O(lgn).
Jule



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