gnugo-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gnugo-devel] arend_1_24.5: dfa 1D conversion


From: Arend Bayer
Subject: Re: [gnugo-devel] arend_1_24.5: dfa 1D conversion
Date: Sun, 3 Feb 2002 00:07:39 +0100 (CET)

Teun wrote:
> Can you give a summary of the gprof output?. Just curious what gnugo
> is spending its time on currently.
> 
The complete file is 1 MB, so probably not advisable to send this to the
list. I don't know how to give a good summary; below is the flat profile
cut off at function with some 0.05 % of the total time. If you are
interested in the call graph as well, its probably best if I send you
gzip of the complete file privately.
(Probably there are more intelligent ways to sort the information using
gprof, but 3 days ago I did not even know this program.)

It seems to me that one could save maybe 1 or 2 % by some 50 lines of code
with a specialized "count_approxlib" function, as approxlib is mainly called
from order_moves in reading.c, where the location of the liberties is
not used.

Arend

P.S.: This from the nngs test suite (with --experimental-influence, without
my patch). In a real game, influence functions probably need more time, as
the owl can then benefit from the persistent reading cache.



Flat profile:

Each sample counts as 0.01 seconds.
  %   cumulative   self              self     total           
 time   seconds   seconds    calls   s/call   s/call  name    
  4.79    378.35   378.35 542574188     0.00     0.00  approxlib
  4.72    751.43   373.08 276307704     0.00     0.00  scan_for_patterns
  3.76   1048.64   297.21 -1557142347    -0.00    -0.00  read_board
  3.35   1313.30   264.66   354350     0.00     0.00  push_owl
  3.35   1577.86   264.56   640882     0.00     0.00  compute_primary_domains
  3.33   1841.08   263.22 139129268     0.00     0.00  order_moves
  3.14   2089.22   248.14  1419264     0.00     0.00  accumulate_influence
  3.07   2331.81   242.59   354350     0.00     0.00  pop_owl
  2.79   2552.01   220.20 241334572     0.00     0.00  check_pattern_light
  2.68   2763.54   211.53 222149524     0.00     0.00  do_play_move
  2.32   2947.16   183.62 19886143     0.00     0.00  
search_persistent_reading_cache
  2.29   3128.47   181.31 243652962     0.00     0.00  do_trymove
  2.13   3296.91   168.44 125361101     0.00     0.00  assimilate_string
  2.10   3462.94   166.03 296105691     0.00     0.00  incremental_order_moves
  2.08   3627.05   164.11 222134986     0.00     0.00  undo_move
  1.84   3772.80   145.75 1513274490     0.00     0.00  compare_int
  1.72   3908.49   135.69 34650274     0.00     0.00  attack2
  1.68   4041.40   132.91 96457181     0.00     0.00  extend_neighbor_string
  1.56   4164.40   123.00 361080959     0.00     0.00  chainlinks2
  1.44   4278.58   114.18 35020408     0.00     0.00  defend2
  1.40   4389.08   110.50   320441     0.00     0.00  make_domains
  1.33   4494.60   105.52 97715810     0.00     0.00  propose_edge_moves
  1.32   4599.22   104.62 98678297     0.00     0.00  hashtable_enter_position
  1.26   4698.58    99.36 356711661     0.00     0.00  findlib
  1.26   4797.84    99.26  1761271     0.00     0.00  do_matchpat
  1.20   4892.58    94.74 53862343     0.00     0.00  
assimilate_neighbor_strings
  1.15   4983.54    90.96 146276503     0.00     0.00  do_get_read_result
  1.10   5070.55    87.01 71830000     0.00     0.00  create_new_string
  1.09   5156.80    86.25 78161339     0.00     0.00  update_liberties
  1.09   5242.82    86.02 244954800     0.00     0.00  hashtable_search
  1.07   5327.48    84.66 193220505     0.00     0.00  
incremental_sloppy_self_atari
  1.05   5410.75    83.27 89524047     0.00     0.00  
hashtable_unlink_closed_results
  1.05   5493.96    83.21 647495733     0.00     0.00  countlib
  1.04   5576.11    82.15                             gg_vsnprintf
  0.98   5653.26    77.15 222582374     0.00     0.00  trymove
  0.96   5729.49    76.23 282799574     0.00     0.00  is_suicide
  0.95   5804.74    75.25 296041677     0.00     0.00  remove_liberty
  0.95   5879.91    75.17 303314927     0.00     0.00  remove_neighbor
  0.91   5951.69    71.78 205642238     0.00     0.00  popgo
  0.88   6021.44    69.75 18265539     0.00     0.00  attack3
  0.87   6090.23    68.79 132294099     0.00     0.00  do_attack
  0.84   6156.88    66.65 276794058     0.00     0.00  hashdata_invert_stone
  0.83   6222.50    65.62 233332060     0.00     0.00  find_origin
  0.82   6287.33    64.83   318417     0.00     0.01  owl_determine_life
  0.81   6351.39    64.06 15669227     0.00     0.00  double_atari_chain2
  0.79   6413.99    62.60 49347374     0.00     0.00  
break_chain2_efficient_moves
  0.72   6470.66    56.67 34538463     0.00     0.00  do_dfa_matchpat
  0.71   6527.07    56.41 190224515     0.00     0.00  komaster_trymove
  0.67   6579.65    52.58 125165440     0.00     0.00  hashnode_new_result
  0.66   6631.85    52.20 201686753     0.00     0.00  is_ko
  0.60   6678.99    47.14 90845540     0.00     0.00  do_find_defense
  0.58   6724.74    45.75 193220505     0.00     0.00  is_self_atari
  0.53   6766.44    41.70  4873474     0.00     0.00  do_find_superstring
  0.51   6807.05    40.61                             gg_snprintf
  0.49   6845.57    38.52 47601105     0.00     0.00  hashposition_compare
  0.48   6883.75    38.18 32918613     0.00     0.00  defend1
  0.46   6920.21    36.46 146275802     0.00     0.00  get_read_result
  0.44   6955.38    35.17 35384630     0.00     0.00  do_remove_string
  0.44   6990.11    34.73 48891185     0.00     0.00  edge_clamp
  0.40   7022.12    32.01 13507912     0.00     0.00  defend3
  0.40   7053.73    31.61   640882     0.00     0.00  count_neighbours
  0.40   7085.18    31.45 64195529     0.00     0.00  owl_shapes_callback
  0.38   7115.18    30.00      321     0.09     0.09  hashtable_clear
  0.37   7144.60    29.42 96098138     0.00     0.00  break_chain_moves
  0.36   7173.31    28.71      701     0.04     0.16  hashtable_partially_clear
  0.35   7200.95    27.64 216131970     0.00     0.00  clear_eye
  0.34   7228.09    27.14 23458161     0.00     0.00  originate_eye
  0.34   7254.88    26.79 146275847     0.00     0.00  hashnode_search
  0.33   7280.69    25.81 23963653     0.00     0.00  attack
  0.32   7306.26    25.57 19709344     0.00     0.00  
store_persistent_reading_cache
  0.32   7331.79    25.53 61702279     0.00     0.00  edge_block
  0.29   7354.94    23.15   587994     0.00     0.00  recognize_eye
  0.29   7377.87    22.93 258727976     0.00     0.00  is_edge_vertex
  0.28   7400.27    22.40   586151     0.00     0.00  compute_eyes_pessimistic
  0.27   7421.76    21.49 48427181     0.00     0.00  edge_closing_backfill
  0.25   7441.90    20.14 222149524     0.00     0.00  hashdata_remove_ko
  0.25   7461.48    19.58 108013137     0.00     0.00  owl_lively
  0.24   7480.56    19.08   318414     0.00     0.00  owl_find_lunches
  0.24   7499.18    18.62                             gg_gettimeofday2
  0.22   7516.24    17.06  6380845     0.00     0.00  verify_stored_board
  0.21   7532.96    16.72    14699     0.00     0.00  init_board
  0.21   7549.24    16.28 75275382     0.00     0.00  neighbor_of_string
  0.18   7563.86    14.62  1008136     0.00     0.00  dfa_matchpat_loop
  0.18   7577.70    13.84 33712505     0.00     0.00  find_cap2
  0.17   7591.16    13.46 73943607     0.00     0.00  liberty_of_string
  0.16   7604.19    13.03 108065985     0.00     0.00  is_lively
  0.16   7616.98    12.79  5123081     0.00     0.00  break_chain2
  0.15   7629.23    12.25 29533480     0.00     0.00  attack1
  0.13   7639.67    10.44 11692561     0.00     0.00  superstring_add_string
  0.12   7649.33     9.66 36190810     0.00     0.00  false_margin
  0.12   7658.61     9.28   504068     0.00     0.00  dfa_prepare_for_match
  0.11   7667.60     8.99 66570131     0.00     0.00  offset
  0.11   7676.37     8.77  1867061     0.00     0.00  attack4
  0.10   7684.04     7.67 31374721     0.00     0.00  same_string
  0.09   7691.42     7.38 25425260     0.00     0.00  is_legal
  0.09   7698.54     7.12  5421956     0.00     0.00  break_chain2_moves
  0.09   7705.50     6.96 34558418     0.00     0.00  write_color_char
  0.09   7712.40     6.90   195425     0.00     0.00  dragon_escape
  0.09   7719.25     6.85 10045888     0.00     0.00  special_rescue
  0.08   7725.97     6.72 41331368     0.00     0.00  countstones
  0.08   7732.21     6.24 33813691     0.00     0.00  owl_safe_move
  0.08   7738.32     6.11    34095     0.00     0.00  segment_region
  0.07   7743.87     5.55  6403670     0.00     0.00  find_cap3
  0.07   7749.24     5.37 12244942     0.00     0.00  findstones
  0.07   7754.50     5.26   120501     0.00     0.00  propagate_eye
  0.06   7759.33     4.83 21612143     0.00     0.00  whose_territory
  0.06   7763.90     4.57   201544     0.00     0.02  do_owl_defend
  0.06   7768.45     4.55 16492748     0.00     0.00  silent_popgo
  0.06   7772.90     4.45  3422380     0.00     0.00  influence_callback
  0.05   7777.22     4.32   157613     0.00     0.02  do_owl_attack
  0.05   7781.52     4.30  2350224     0.00     0.00  special_rescue5
  0.05   7785.66     4.14 16963119     0.00     0.00  next_map
  0.05   7789.29     3.63   526686     0.00     0.00  board_to_p
  0.04   7792.79     3.50  2666541     0.00     0.00  special_rescue2
  0.04   7795.88     3.09  5727489     0.00     0.00  whose_moyo_restricted
  0.04   7798.87     2.99  4631974     0.00     0.00  special_attack4
  0.04   7801.70     2.83  2056824     0.00     0.00  find_defense
  0.04   7804.48     2.78 12084381     0.00     0.00  mark_string

 %         the percentage of the total running time of the
time       program used by this function.

cumulative a running sum of the number of seconds accounted
 seconds   for by this function and those listed above it.

 self      the number of seconds accounted for by this
seconds    function alone.  This is the major sort for this
           listing.

calls      the number of times this function was invoked, if
           this function is profiled, else blank.
 
 self      the average number of milliseconds spent in this
ms/call    function per call, if this function is profiled,
           else blank.

 total     the average number of milliseconds spent in this
ms/call    function and its descendents per call, if this 
           function is profiled, else blank.

name       the name of the function.  This is the minor sort
           for this listing. The index shows the location of
           the function in the gprof listing. If the index is
           in parenthesis it shows where it would appear in
           the gprof listing if it were to be printed.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]