[Freeciv-Dev] Re: Profile.
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Wed, Sep 26, 2001 at 06:28:49PM +0200, Raimar Falke wrote:
[ And another reply to myself ]
> CHECK_MAP_POS is a noop:
>
> % cumulative self self total
> time seconds seconds calls ms/call ms/call name
> 11.82 12.64 12.64 27300 0.46 0.66 really_generate_warmap
> 5.59 18.62 5.98 107829491 0.00 0.00 normalize_map_pos
> 4.95 23.91 5.29 105677697 0.00 0.00 tech_exists
> 3.02 27.14 3.23 95909197 0.00 0.00 get_invention
> 2.68 30.00 2.86 49607029 0.00 0.00 map_get_terrain
> 2.49 32.66 2.66 107846938 0.00 0.00 is_real_tile
> 2.41 35.24 2.58 86999744 0.00 0.00 map_get_tile
> 2.16 37.55 2.31 24840101 0.00 0.00
> base_local_city_map_to_map
> 1.89 39.57 2.02 1006465 0.00 0.00 road_bonus
> 1.85 41.55 1.98 46484826 0.00 0.00 unit_type_flag
> 1.64 43.30 1.75 36336394 0.00 0.00 is_valid_city_coords
> 1.64 45.05 1.75 623367 0.00 0.01
> player_knows_techs_with_flag
> 1.51 46.66 1.61 35899901 0.00 0.00 find_genlist_position
> 1.47 48.23 1.57 1558 1.01 4.87 ai_manage_explorer
> 1.45 49.78 1.55 14967809 0.00 0.00 add_to_mapqueue
> 1.33 51.20 1.42 15001555 0.00 0.00 get_from_mapqueue
> 1.32 52.61 1.41 25211331 0.00 0.00 improvement_exists
> 1.28 53.98 1.37 302 4.54 7.67 check_fow
> 1.21 55.27 1.29 35898163 0.00 0.00 genlist_iterator_init
> 1.18 56.53 1.26 22976603 0.00 0.00 map_get_city
> 1.15 57.76 1.23 7683 0.16 1.88 evaluate_improvements
> 1.05 58.88 1.12 2221817 0.00 0.00 amortize
> 1.01 59.96 1.08 18569271 0.00 0.00 map_get_special
> -----------------------------------------------
> 0.00 0.00 17447/107846938 check_units [391]
> 2.66 0.00 107829491/107846938 normalize_map_pos [21]
> [64] 2.5 2.66 0.00 107846938 is_real_tile [64]
> -----------------------------------------------
This just screams to be fixed. See the attached patch. The new profile
(CHECK_MAP_POS==noop):
time seconds seconds calls ms/call ms/call name
11.63 11.61 11.61 27300 0.43 0.61 really_generate_warmap
5.18 16.78 5.17 105677697 0.00 0.00 tech_exists
4.40 21.17 4.39 107846938 0.00 0.00 normalize_map_pos
3.52 24.68 3.51 95909197 0.00 0.00 get_invention
2.76 27.43 2.75 49607029 0.00 0.00 map_get_terrain
2.65 30.07 2.64 86999744 0.00 0.00 map_get_tile
2.20 32.27 2.20 24840101 0.00 0.00 base_local_city_map_to_map
2.08 34.35 2.08 46484826 0.00 0.00 unit_type_flag
1.81 36.16 1.81 1006465 0.00 0.00 road_bonus
1.81 37.97 1.81 302 5.99 9.17 check_fow
1.65 39.62 1.65 623367 0.00 0.01
player_knows_techs_with_flag
1.54 41.16 1.54 15001555 0.00 0.00 get_from_mapqueue
1.53 42.69 1.53 36336394 0.00 0.00 is_valid_city_coords
1.50 44.19 1.50 35898163 0.00 0.00 genlist_iterator_init
1.36 45.55 1.36 35899901 0.00 0.00 find_genlist_position
1.34 46.89 1.34 33758503 0.00 0.00 city_owner
1.33 48.22 1.33 7683 0.17 1.70 evaluate_improvements
1.29 49.51 1.29 1558 0.83 4.22 ai_manage_explorer
1.22 50.73 1.22 22976603 0.00 0.00 map_get_city
1.13 51.86 1.13 14967809 0.00 0.00 add_to_mapqueue
1.09 52.95 1.09 25211331 0.00 0.00 improvement_exists
1.04 53.99 1.04 18569271 0.00 0.00 map_get_special
1.02 55.01 1.02 2221817 0.00 0.00 amortize
....
0.00 99.79 0.00 17447 0.00 0.00 is_real_tile
Raimar
--
email: rf13@xxxxxxxxxxxxxxxxx
"The two rules for success in life are:
1) Never tell them everything you know."
is_real_tile1.diff
Description: Text document
[Freeciv-Dev] Re: Profile., Gaute B Strokkenes, 2001/09/27
|
|