mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-20 09:06:45 +08:00
Use a std::vector to store searchMoves
A std::set (that is a rb_tree) seems really overkill to store at most a handful of moves and nothing in the common case. No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
10
src/uci.cpp
10
src/uci.cpp
@@ -212,7 +212,7 @@ namespace {
|
||||
void go(Position& pos, istringstream& is) {
|
||||
|
||||
Search::LimitsType limits;
|
||||
std::set<Move> searchMoves;
|
||||
vector<Move> searchMoves;
|
||||
string token;
|
||||
|
||||
while (is >> token)
|
||||
@@ -239,7 +239,7 @@ namespace {
|
||||
limits.ponder = true;
|
||||
else if (token == "searchmoves")
|
||||
while (is >> token)
|
||||
searchMoves.insert(move_from_uci(pos, token));
|
||||
searchMoves.push_back(move_from_uci(pos, token));
|
||||
}
|
||||
|
||||
Threads.start_searching(pos, limits, searchMoves);
|
||||
@@ -263,8 +263,8 @@ namespace {
|
||||
|
||||
int e = time.elapsed();
|
||||
|
||||
std::cout << "\nNodes " << n
|
||||
<< "\nTime (ms) " << e
|
||||
<< "\nNodes/second " << int(n / (e / 1000.0)) << std::endl;
|
||||
cout << "\nNodes " << n
|
||||
<< "\nTime (ms) " << e
|
||||
<< "\nNodes/second " << int(n / (e / 1000.0)) << endl;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user