node->children vector 预留空间由48改为24,

节省了空间,但对效率几乎没有影响。
This commit is contained in:
CalciteM Team 2019-07-20 20:56:33 +08:00
parent 284c1c29cb
commit 922206b3ab
1 changed files with 1 additions and 1 deletions

View File

@ -178,7 +178,7 @@ void NineChessAi_ab::generateLegalMoves(Node *node, int bestMove)
int pos = 0;
// 留足余量空间避免多次重新分配,此动作本身也占用 CPU/内存 开销
node->children.reserve(48);
node->children.reserve(24);
#ifdef MOVE_PRIORITY_TABLE_SUPPORT
#ifdef RANDOM_MOVE