Flat profile:
Each sample counts as 0.01 seconds.
% cumulative self self total
time seconds seconds calls ms/call ms/call name
62.72 0.05 0.05 main
25.09 0.07 0.02 1 20.07 20.07 free_hash_table
12.54 0.08 0.01 349903 0.00 0.00 hash2
0.00 0.08 0.00 349900 0.00 0.00 append
0.00 0.08 0.00 3 0.00 0.00 findName
0.00 0.08 0.00 2 0.00 0.00 diff_in_second
0.00 0.08 0.00 1 0.00 0.00 creatHashTable
^L
Call graph
granularity: each sample hit covers 2 byte(s) for 12.46% of 0.08 seconds
index % time self children called name
<spontaneous>
[1] 100.0 0.05 0.03 main [1]
0.02 0.00 1/1 free_hash_table [2]
0.00 0.01 349900/349900 append [4]
0.00 0.00 3/3 findName [5]
0.00 0.00 2/2 diff_in_second [6]
0.00 0.00 1/1 creatHashTable [7]
-----------------------------------------------
0.02 0.00 1/1 main [1]
[2] 25.0 0.02 0.00 1 free_hash_table [2]
-----------------------------------------------
0.00 0.00 3/349903 findName [5]
0.01 0.00 349900/349903 append [4]
[3] 12.5 0.01 0.00 349903 hash2 [3]
-----------------------------------------------
0.00 0.01 349900/349900 main [1]
[4] 12.5 0.00 0.01 349900 append [4]
0.01 0.00 349900/349903 hash2 [3]
-----------------------------------------------
0.00 0.00 3/3 main [1]
[5] 0.0 0.00 0.00 3 findName [5]
0.00 0.00 3/349903 hash2 [3]
-----------------------------------------------
0.00 0.00 2/2 main [1]
[6] 0.0 0.00 0.00 2 diff_in_second [6]
-----------------------------------------------
0.00 0.00 1/1 main [1]
[7] 0.0 0.00 0.00 1 creatHashTable [7]
-----------------------------------------------
可以看出來function call集中在append跟hash,
字典檔為349900,hash次數 = append + findName次數