Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2003:
[Freeciv-Dev] (PR#6170) Alternative city square utilizations
Home

[Freeciv-Dev] (PR#6170) Alternative city square utilizations

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jdwheeler42@xxxxxxxxx
Subject: [Freeciv-Dev] (PR#6170) Alternative city square utilizations
From: "Remi Bonnet" <remi.bonnet@xxxxxxxxxxx>
Date: Tue, 21 Oct 2003 10:36:17 -0700
Reply-to: rt@xxxxxxxxxxxxxx

[per - Sun Oct 19 02:49:41 2003]:

> While I'm not against supporting alternate city square sizes, I want to
> see some analysis of what this is going to cost in terms of code bloat and
> speed impact before any significant amount of code goes in.
> 
>   - Per
> 

I made some tests with and without my first patch (same map radius) and
i haven't been able to find some speed difference. (i always get a +/-
1% difference, sometimes one is faster, sometimes the other is faster)

For the full patch I don't think that there will be too much speed
impact with current settings. the array will be alloced only once and if
gen-impr can't change the map radius, the pcity->radius cached data will
need to be updated only at city growth. Since the radius calculation is
not so expensive, i don't think that this will slow the game.

But, with different settings, things will not be so good: especially i
have see that the (easy) AI doesn't deal correctly with larger maps: it
tries to improve every tiles with settler so can have only two cities at
1 AC. This is not a new bug but larger maps make it really critical.
With larger maps, the cache3 of the cm manager will be *huge* (n^4
growth at first sight where n is radius) and maybe really slower. I
haven't see how the AI deals with maps but i think that larger maps mean
slower AI. Other things should be ok. (i hope :-/ )

Just making the radius = 1 -> radius = 2 threshold should not require so
much CPU and will be already a great thing.
More globally, I think that this feature is definitively a great one.

Remi


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