Complete.Org: Mailing Lists: Archives: freeciv-ai: November 2003:
[freeciv-ai] (PR#6595) Optimize/reimplement CM
Home

[freeciv-ai] (PR#6595) Optimize/reimplement CM

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: i-freeciv-lists@xxxxxxxxxxxxx
Subject: [freeciv-ai] (PR#6595) Optimize/reimplement CM
From: "Benoit Hudson" <bh@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 11 Nov 2003 09:46:48 -0800
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=6595 >

> [i-freeciv-lists@xxxxxxxxxxxxx - Tue Nov 11 07:15:00 2003]:
> > It should be possible to speed it up using the caches: cache3 could be
> > an array indexed by city id; and we could start off with a check of
> > whether the city has changed in any way since we last optimized (are all
> > production values the same, and all the land is the same, same number of
> > citizens, same tiles open, ...).  If so, start from scratch.  This would
> > speed up buying buildings, for instance.
> 
> Yes it is possible. It will however increase the memory usage. Note
> that cache3 is 705kb.

cache3 is enormous because it allocates far more room for combinations
than it needs; dynamically allocating that room cut the space usage down
from over 50 Mb to under 7 on the server in a game with ~100 highly
developed cities.  Is that manageable?

I'm not confident the patch is as stable as alpha yet, but I'll play
around a bit.  Also, I want to check that it's actually faster.  The
cache3 hit rate is certainly up a lot just when loading the game, and I
expect it to be dramatically improved when you actually play.  It
remains to be seen if that translates to less time / call.


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