From 2efeded6e37283e297f15efde91c1ec3a3e9e920 Mon Sep 17 00:00:00 2001 From: lucasart Date: Thu, 7 Aug 2014 21:07:57 +0800 Subject: [PATCH] Write perft(N-1) into cout So that one can redirect cout to /dev/null and only print print cerr in the terminal (for more accurate speed tests). Suggested by Marco. No functional change. --- src/benchmark.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/benchmark.cpp b/src/benchmark.cpp index de8b48bb..a92a634c 100644 --- a/src/benchmark.cpp +++ b/src/benchmark.cpp @@ -145,7 +145,7 @@ void benchmark(const Position& current, istream& is) { pos.do_move(*it, si); uint64_t cnt = limits.depth > 1 ? Search::perft(pos, (limits.depth - 1) * ONE_PLY) : 1; pos.undo_move(*it); - cerr << move_to_uci(*it, pos.is_chess960()) << ": " << cnt << endl; + cout << move_to_uci(*it, pos.is_chess960()) << ": " << cnt << endl; nodes += cnt; } else -- 2.39.2