[Freeciv-Dev] More profiling.
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
I've been doing some more selective inlining, and come up with this:
Flat profile:
Each sample counts as 0.01 seconds.
% cumulative self self total
time seconds seconds calls ms/call ms/call name
13.39 125.58 125.58 1154 108.82 300.01 ai_manage_explorer
10.90 227.74 102.16 1504331 0.07 0.07 invasion_funct
10.44 325.59 97.85 4891 20.01 28.56 really_generate_warmap
8.16 402.13 76.54 2884741 0.03 0.04 is_my_zoc
3.68 436.65 34.52 19415616 0.00 0.00 find_genlist_position
2.80 462.92 26.27 2041 12.87 125.13 find_something_to_kill
2.52 486.53 23.61 12499745 0.00 0.00 is_non_allied_unit_tile
1.84 503.78 17.25 4777398 0.00 0.00 get_from_mapqueue
1.81 520.72 16.94 229328 0.07 0.08 road_bonus
1.52 534.95 14.23 6137906 0.00 0.00 map_get_continent
1.44 548.47 13.52 249 54.30 417.16 auto_settler_findwork
1.43 561.91 13.44 6188332 0.00 0.00 is_ground_unit
1.36 574.68 12.77 3994376 0.00 0.00 map_get_special
1.31 586.96 12.28 409129 0.03 0.05
city_reinforcements_cost_and_value
1.28 598.92 11.96 7137916 0.00 0.00 unit_flag
1.27 610.80 11.88 4772135 0.00 0.00 add_to_mapqueue
1.11 621.17 10.37 2850789 0.00 0.00 is_non_allied_city_tile
1.10 631.46 10.29 2550020 0.00 0.05 tile_is_accessible
1.04 641.22 9.76 359387 0.03 0.07 city_get_food_tile
0.88 649.51 8.29 3505780 0.00 0.00 improvement_exists
[snip]
0.00 937.65 0.00 1 0.00 10.21 wipe_unit
This is a 20% speedup. The affected functions are:
map_get_tile(), map_get_city(), map_get_terrain(), map_get_known(),
normalize_map_pos() and genlist_iterator_init() .
This isn't entirely free, though:
donald:~$ ls -l `which civserver`
-rwxr-xr-x 1 root root 1869672 jan 5 15:27 /usr/local/bin/civserver
donald:~$ ls -l civserver
-rwxr-xr-x 1 gs234 biggaute 1784463 jan 5 15:26 civserver
donald:~$
However, I submit that on machines where the 84kb difference in is
likely to be an issue the speedup is more important.
I'm thinking of trying to inline map_get_special() and
map_get_continent as well, but I'll try and see if I can think of a
clean way to do all this first.
--
Big Gaute http://www.srcf.ucam.org/~gs234/
I just heard the SEVENTIES were over!! And I was just getting in touch
with my LEISURE SUIT!!
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] More profiling.,
Gaute B Strokkenes <=
|
|