[Freeciv-Dev] Re: (PR#4381) some clean with get_map_tile(...) , get_map_
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: |
bursig@xxxxxxxxx |
Subject: |
[Freeciv-Dev] Re: (PR#4381) some clean with get_map_tile(...) , get_map_terrain(...), get_map_special(...) ... |
From: |
"Per I. Mathisen" <per@xxxxxxxxxxx> |
Date: |
Sat, 14 Jun 2003 04:16:15 -0700 |
Reply-to: |
rt@xxxxxxxxxxxxxx |
On Fri, 13 Jun 2003, Rafa³ Bursig wrote:
> Could you test this attached patch on your Sun. I fix all bugs and it
> should patch and work fine.
Autogame behaviour was different between patched and unpatched, so
somewhere you changed code that was not merely an optimization. This makes
the tests below almost worthless except for with or without #define TEST.
I did two tests each (first no savegames, second one savegame), with -O3
and -DDEBUG.
Original cvs:
user 0m31.220s
user 0m31.270s
With patch:
user 0m32.230s
user 0m32.270s
With patch + #define TEST:
user 0m32.370s
user 0m32.480s
Then ran the same tests with -O2 and -DNDEBUG:
Original cvs:
user 0m18.160s
user 0m18.140s
With patch:
user 0m19.200s
user 0m19.050s
With patch + #define TEST:
user 0m18.940s
user 0m18.960s
Then -O3 and -DNDEBUG (no savegames):
Original cvs:
user 0m17.500s
user 0m17.410s
With patch:
user 0m18.550s
user 0m18.520s
With patch + #define TEST:
user 0m18.580s
user 0m18.700s
I estimate the error margin to be around +/- 0.2 due to other processes.
Conclusions: -DDEBUG is slow :-) Trying to out-smart gcc in -O3 mode is
usually a waste of time. Making map_get_tile() into a macro may not give
that much increase in speed after all.
> Other problem that I found is in ai/aiair.c ( in
> find_something_to_bomb(...) function )
> line 180 and 186. What x,y cordinates shoud there be : x,y or x1,y1.
> (in map_get_known(...) and map_get_known_and_seen(...) )
Should be x1,y1, AFAIK. Looks like a bug. Not that it will ever trigger,
since the handicap is only present for non-hard AI, and that AI doesn't
use air units... Greg?
- Per
- [Freeciv-Dev] Re: (PR#4381) some clean with get_map_tile(...) , get_map_terrain(...), get_map_special(...) ..., (continued)
[Freeciv-Dev] Re: (PR#4381) some clean with get_map_tile(...) , get_map_terrain(...), get_map_special(...) ..., Per I. Mathisen, 2003/06/11
- Message not available
- [Freeciv-Dev] Re: (PR#4381) some clean with get_map_tile(...) , get_map_terrain(...), get_map_special(...) ..., Raimar Falke, 2003/06/11
- Message not available
- [Freeciv-Dev] Re: (PR#4381) some clean with get_map_tile(...) , get_map_terrain(...), get_map_special(...) ..., rwetmore@xxxxxxxxxxxx, 2003/06/11
- Message not available
- [Freeciv-Dev] Re: (PR#4381) some clean with get_map_tile(...) , get_map_terrain(...), get_map_special(...) ..., Raimar Falke, 2003/06/11
Message not available
[Freeciv-Dev] Re: (PR#4381) some clean with get_map_tile(...) , get_map_terrain(...), get_map_special(...) ..., Per I. Mathisen, 2003/06/11
[Freeciv-Dev] Re: (PR#4381) some clean with get_map_tile(...) , get_map_terrain(...), get_map_special(...) ..., Per I. Mathisen, 2003/06/12
[Freeciv-Dev] Re: (PR#4381) some clean with get_map_tile(...) , get_map_terrain(...), get_map_special(...) ...,
Per I. Mathisen <=
Message not available
[Freeciv-Dev] Re: (PR#4381) some clean with get_map_tile(...) , get_map_terrain(...), get_map_special(...) ..., Per I. Mathisen, 2003/06/14
[Freeciv-Dev] Re: (PR#4381) some clean with get_map_tile(...) , get_map_terrain(...), get_map_special(...) ..., Per I. Mathisen, 2003/06/14
|
|