[Freeciv-Dev] Re: chance of winning a battle
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Sat, 21 Jul 2001, Gregory.Berkolaiko@xxxxxxxxxxxxxx wrote:
>
> ok I did some profiling (not too much, couple of turns, took 2
> cities or so, 6 AI players, server and client on the same machine)
> and here are some results:
>
> the top of the pop is...
> *applause*
> normalize_map_pos from common/map.c with 10.84% of the votes
> *big applause*
>
> the reason being it's called lots of times and is not optimal,
> attached is the patch that reduces the relative time to 4.54% and, I
> think, makes the function a bit safer. we can do a bit better,
> substituting "if" for "while" on 2 occasions but it's unsafe (kind
> of assumes that we cannot go too far off the map).
Thanks, I've applied the patch.
--
Big Gaute http://www.srcf.ucam.org/~gs234/
Dizzy, are we "REAL PEOPLE" or "AMAZING ANIMALS"?
- [Freeciv-Dev] Re: Patch correcting win_cnace, (continued)
- [Freeciv-Dev] Re: Patch correcting win_cnace, Gaute B Strokkenes, 2001/07/22
- [Freeciv-Dev] Re: Patch correcting win_cnace, Thue, 2001/07/22
- [Freeciv-Dev] Re: Patch correcting win_cnace, Gregory Berkolaiko, 2001/07/20
- [Freeciv-Dev] Re: Patch correcting win_cnace, Thue, 2001/07/20
- [Freeciv-Dev] Re: chance of winning a battle, Christian Knoke, 2001/07/15
- [Freeciv-Dev] Re: chance of winning a battle, Christian Knoke, 2001/07/15
- [Freeciv-Dev] Re: chance of winning a battle, Gaute B Strokkenes, 2001/07/15
- [Freeciv-Dev] Re: chance of winning a battle, Gregory Berkolaiko, 2001/07/21
- [Freeciv-Dev] Re: chance of winning a battle,
Gaute B Strokkenes <=
- [Freeciv-Dev] Re: chance of winning a battle, Trent Piepho, 2001/07/16
- [Freeciv-Dev] Re: chance of winning a battle, Gregory Berkolaiko, 2001/07/19
- [Freeciv-Dev] Re: chance of winning a battle, Thue, 2001/07/19
- [Freeciv-Dev] Re: chance of winning a battle, Erik Sigra, 2001/07/19
- [Freeciv-Dev] Re: chance of winning a battle, Trent Piepho, 2001/07/12
[Freeciv-Dev] Re: chance of winning a battle, Gregory Berkolaiko, 2001/07/12
[Freeciv-Dev] Re: chance of winning a battle, Daniel Speyer, 2001/07/12
|
|