プロファイリング
現バージョン(2012.010)のプロファイリング結果。
Evaluate(評価関数)はKPP+差分評価無しなのでたぶんこんなもん。
Search(探索部)、isAttackAll(利きの算出、SEEで使う)、GenNext(1手持ってくる)あたりが遅い。GenNextが遅いのはsortのせい?
ただ、このあたりを高速化しても数割にしかならないので、読める手数は1手も増えない。困った。まだ旧sakurapyonより2-3手浅くしか読めないのに… (1手詰を入れると、さらに2-3割遅くなるのに)
ちょっと行き詰った感があるなあ。さて、どうしたものか。
Each sample counts as 0.01 seconds. % cumulative self self total time seconds seconds calls ms/call ms/call name 31.93 18.02 18.02 79836957 0.00 0.00 Board::Evaluate() 6.48 21.68 3.66 12851460 0.00 0.00 int Think::hSearch<(Player_t)0>(Tree*, int, int, int, int, int) 6.38 25.28 3.60 28703969 0.00 0.00 Board::isAttackedAll(int, BitBoard&) 6.31 28.84 3.56 13874603 0.00 0.00 int Think::hSearch<(Player_t)1>(Tree*, int, int, int, int, int) 5.90 32.17 3.33 57401408 0.00 0.00 Think::GenNext(Player_t, Tree*) 5.79 35.44 3.27 28703969 0.00 0.00 Think::See(Player_t, int, Move) 3.67 37.51 2.07 5516832 0.00 0.00 Move* Board::hGenTacticalMove<(Player_t)0>(Move*) 2.68 39.02 1.51 16123560 0.00 0.00 int Board::hisAttacked<(Player_t)1, (Player_t)0>(int, BitBoard&) 2.29 40.31 1.29 20767202 0.00 0.00 void Board::hMakeMove<(Player_t)0>(Move) 2.06 41.47 1.16 17374563 0.00 0.00 Think::GenNextQui(Player_t, Tree*, int) 2.02 42.61 1.14 26712105 0.00 0.00 hash_get(unsigned long, int, int, int, int, int&, Move&) 1.90 43.68 1.07 20762764 0.00 0.00 void Board::hUnMakeMove<(Player_t)0>(Move) 1.80 44.70 1.02 45916063 0.00 0.00 int Board::hisOpenCheckByMove<(Player_t)1>(Move, int) 1.78 45.70 1.01 29988907 0.00 0.00 int Board::hisCheckByMove<(Player_t)0>(Move, int) 1.77 46.70 1.00 4705672 0.00 0.00 Move* Board::hGenTacticalMove<(Player_t)1>(Move*) 1.63 47.62 0.92 1825661 0.00 0.00 Move* Board::hGenEvasion<(Player_t)1>(Move*) 1.60 48.53 0.91 44507472 0.00 0.00 int Board::hisOpenCheckByMove<(Player_t)0>(Move, int) 1.59 49.43 0.90 16830493 0.00 0.00 void Board::hMakeMove<(Player_t)1>(Move) 1.45 50.25 0.82 16825976 0.00 0.00 void Board::hUnMakeMove<(Player_t)1>(Move) 1.13 50.89 0.64 18134398 0.00 0.00 int Think::hQuiescenceSearch<(Player_t)1>(Tree*, int, int, int, int, int, int)