[Freeciv-Dev] Re: (PR#13340) Owner change and happyborders
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=13340 >
On Mon, Jun 27, 2005 at 05:32:47AM -0700, Mateusz Stefek wrote:
> + hash_insert(cities_to_refresh, &(homecity->id), NULL);
Why not put in homecity?
> + for (i = 0; i < entries; i++) {
> + int id = *(int*)hash_key_by_number(cities_to_refresh, i);
This is O(n^2): look at the implementation of hash_key_by_number.
Probably Per is right: a list or vector would do perfectly well despite
their quadratic time, since we will only be having a small number of
cities.
-- Benoît
- [Freeciv-Dev] Re: (PR#13340) Owner change and happyborders, Per I. Mathisen, 2005/06/26
- [Freeciv-Dev] (PR#13340) Owner change and happyborders, Mateusz Stefek, 2005/06/26
- [Freeciv-Dev] Re: (PR#13340) Owner change and happyborders, Jason Short, 2005/06/26
- [Freeciv-Dev] Re: (PR#13340) Owner change and happyborders, Benoit Hudson, 2005/06/26
- [Freeciv-Dev] (PR#13340) Owner change and happyborders, Mateusz Stefek, 2005/06/27
- [Freeciv-Dev] (PR#13340) Owner change and happyborders, Mateusz Stefek, 2005/06/27
- [Freeciv-Dev] Re: (PR#13340) Owner change and happyborders, Per I. Mathisen, 2005/06/27
- [Freeciv-Dev] Re: (PR#13340) Owner change and happyborders,
Benoit Hudson <=
- [Freeciv-Dev] Re: (PR#13340) Owner change and happyborders, Jason Short, 2005/06/27
- [Freeciv-Dev] Re: (PR#13340) Owner change and happyborders, Benoit Hudson, 2005/06/27
- [Freeciv-Dev] (PR#13340) Owner change and happyborders, Mateusz Stefek, 2005/06/28
- [Freeciv-Dev] Re: (PR#13340) Owner change and happyborders, Benoit Hudson, 2005/06/28
|
|