From 912fc0fa918029d656da14351050b34278ae3fa3 Mon Sep 17 00:00:00 2001 From: Chijun Sima <1300339379@qq.com> Date: Sun, 24 Dec 2017 16:40:07 +0800 Subject: [PATCH] perf improve --- chessboard/chessboard.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/chessboard/chessboard.cpp b/chessboard/chessboard.cpp index 1de9050..cdada70 100644 --- a/chessboard/chessboard.cpp +++ b/chessboard/chessboard.cpp @@ -28,6 +28,7 @@ chessboard::chessboard() noexcept pos[i][ii] = 7 - max(abs(i - 7), abs(ii - 7)); } } + score_cache.reserve(15 * 15); for (int i = 0; i < 15; ++i) { for (int ii = 0; ii < 15; ++ii)