Follow-up Comment #2, patch #4933 (project freeciv):

I have got better results when profiling. Without the patch:

 10.48    269.30   269.30 6034611504     0.00     0.00  normalize_map_pos
  7.72    467.57   198.27 1074190408     0.00     0.00  pf_normal_map_iterate
  7.02    647.97   180.40 209839846     0.00     0.00  pf_fuel_map_iterate
  5.44    787.69   139.72 924377761     0.00     0.00  pf_jumbo_map_iterate
  4.50    903.37   115.68 8325248516     0.00     0.00  are_reqs_active
  4.31   1014.14   110.77 246671460     0.00     0.00 
get_fuel_moves_left_req
  2.57   1080.12    65.98 3389242058     0.00     0.00  map_is_known_and_seen
  2.37   1140.96    60.84 4665055165     0.00     0.00  mapstep
  2.28   1199.54    58.58 19112205604     0.00     0.00  genlist_head
  2.11   1253.69    54.15 3499063457     0.00     0.00  is_possible_base_fuel
[...]
  0.00   2568.45     0.00        1     0.00     0.00 
update_nations_with_startpos

-----------------------------------------------
                0.16    0.56  348441/246671460     pf_map_new [291]
              110.61  395.53 246323019/246671460     pf_fuel_map_iterate [6]
[14]    19.7  110.77  396.08 246671460         get_fuel_moves_left_req [14]
               54.15   88.79 3499063457/3499063457     is_possible_base_fuel
[31]
              134.06    0.00 3004180578/6034611504     normalize_map_pos [23]
               18.72   99.47 3256558157/3391373619     tile_get_known [36]
                0.89    0.00 238401421/238403898    
map_vector_to_real_distance [341]
-----------------------------------------------
               21.43  102.92 46599995/46599995     find_something_to_kill [9]
[35]     4.8   21.43  102.92 46599995         invasion_funct [35]
               55.83    0.00 1251036497/6034611504     normalize_map_pos [23]
                0.51   27.65 173400395/179506916     dai_diplomacy_get [86]
               14.34    3.09 3577616760/12850609884     tile_city [52]
                0.52    0.00 361939781/1712405090     city_owner [246]
                0.28    0.07 15776297/16347949     base_get_defense_power
[442]
                0.34    0.00 188539386/202124883     player_diplstate_get
[445]
                0.07    0.00 46599995/2911444067     unit_owner [196]
                0.05    0.00 15895384/19112205604     genlist_head [59]
                0.01    0.04 18246946/177351059     is_military_unit [421]
                0.04    0.00 46599995/2000038149     unit_tile [275]
                0.03    0.00 15895384/1397822721     city_tile [242]
                0.02    0.00 18246946/22158942239     genlist_link_data [88]
                0.01    0.00 18246946/22146923648     genlist_link_next [126]
                0.01    0.00 15712070/1023670836     unit_class [373]
                0.00    0.00  183314/51700509     city_ai_data [322]
                0.00    0.00  183314/1086797480     unit_has_type_flag [259]
                0.00    0.00  182001/4476158273     unit_type [179]
-----------------------------------------------


With the patch:

  7.59    175.57   175.57 1074190408     0.00     0.00  pf_normal_map_iterate
  7.07    339.07   163.50 209839846     0.00     0.00  pf_fuel_map_iterate
  6.69    493.82   154.75 22061795161     0.00     0.00  map_pos_to_tile
  5.04    610.41   116.59 8325248516     0.00     0.00  are_reqs_active
  4.58    716.39   105.98 924377761     0.00     0.00  pf_jumbo_map_iterate
  3.07    787.48    71.09 4665055165     0.00     0.00  mapstep
  2.68    849.50    62.02 3499063457     0.00     0.00  is_possible_base_fuel
  2.62    910.16    60.66 19112205595     0.00     0.00  genlist_head
  2.60    970.24    60.08 3389242058     0.00     0.00  map_is_known_and_seen
  2.25   1022.30    52.07 10054990814     0.00     0.00  map_move_cost
[...]
  0.00   2312.28     0.00        1     0.00     0.00 
update_nations_with_startpos

-----------------------------------------------
                0.05    0.43  348441/246671460     pf_map_new [286]
               38.65  307.13 246323019/246671460     pf_fuel_map_iterate [6]
[17]    15.0   38.70  307.57 246671460         get_fuel_moves_left_req [17]
               62.02   87.07 3499063457/3499063457     is_possible_base_fuel
[27]
               36.98   93.40 3256558157/3391373619     tile_get_known [31]
               27.41    0.00 3908096703/22061795161     map_pos_to_tile [26]
                0.69    0.00 238401421/238403898    
map_vector_to_real_distance [367]
-----------------------------------------------
                7.86   68.37 46599995/46599995     find_something_to_kill [9]
[50]     3.3    7.86   68.37 46599995         invasion_funct [50]
               25.64    0.00 3655590811/22061795161     map_pos_to_tile [26]
                0.52   23.71 173400395/179506916     dai_diplomacy_get [94]
               13.34    3.24 3577616760/12850609884     tile_city [56]
                0.83    0.00 361939781/1712405090     city_owner [210]
                0.49    0.00 188539386/202124883     player_diplstate_get
[397]
                0.24    0.07 15776297/16347949     base_get_defense_power
[460]
                0.07    0.00 46599995/2911444067     unit_owner [200]
                0.05    0.00 15895384/19112205595     genlist_head [55]
                0.01    0.04 18246946/177351059     is_military_unit [422]
                0.04    0.00 46599995/2000038149     unit_tile [288]
                0.03    0.00 15895384/1397822721     city_tile [234]
                0.03    0.00 18246946/22158942239     genlist_link_data [83]
                0.01    0.00 18246946/22146923648     genlist_link_next [128]
                0.01    0.00 15712070/1023670836     unit_class [387]
                0.00    0.00  183314/51700509     city_ai_data [310]
                0.00    0.00  183314/1086797480     unit_has_type_flag [250]
                0.00    0.00  182001/4476158273     unit_type [188]
-----------------------------------------------



    _______________________________________________________

Reply to this item at:

  <http://gna.org/patch/?4933>

_______________________________________________
  Message posté via/par Gna!
  http://gna.org/


_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to