Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2001:
[Freeciv-Dev] Re: curiosity
Home

[Freeciv-Dev] Re: curiosity

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: rf13@xxxxxxxxxxxxxxxxxxxxxx, Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Cc: Paul Zastoupil <paulz@xxxxxxxxxxxx>, Reinier Post <rp@xxxxxxxxxx>, Freeciv developers <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: curiosity
From: Andrew Sutton <ansutton@xxxxxxx>
Date: Sat, 1 Dec 2001 10:40:55 -0500

> First: searching a list of 10 players isn't slow. Complexity kicks in
> latter.

no, but searching a list of a couple thousand is - well, relatively :) 
besides, all those O(n/2) operations add up after a while and do affect game 
performance in the long run.

> Second: we have also hashs. See common/game:struct unit
> *find_unit_by_id(int id) and struct city *find_city_by_id(int id);

cool. i never saw that. all the code i looked at used lists.

andy


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