X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fbenchmark.cpp;h=c3a4191337d69c4d8f91f637e2c3839b8857eb78;hb=dba1bc354a74bf7774c453ac779b3ce462c2b8e2;hp=b0b9e16b7881da1783326d72825a376998e99020;hpb=8b00e50cb74392c24938c0019ac528a9feabd614;p=stockfish diff --git a/src/benchmark.cpp b/src/benchmark.cpp index b0b9e16b..c3a41913 100644 --- a/src/benchmark.cpp +++ b/src/benchmark.cpp @@ -120,7 +120,7 @@ void benchmark(const Position& current, istream& is) { if (limitType == "perft") { - int64_t cnt = Search::perft(pos, limits.depth * ONE_PLY); + size_t cnt = Search::perft(pos, limits.depth * ONE_PLY); cerr << "\nPerft " << limits.depth << " leaf nodes: " << cnt << endl; nodes += cnt; } @@ -132,10 +132,10 @@ void benchmark(const Position& current, istream& is) { } } - int e = time.elapsed(); + int e = time.elapsed() + 1; // Assure positive to avoid a 'divide by zero' cerr << "\n===========================" << "\nTotal time (ms) : " << e << "\nNodes searched : " << nodes - << "\nNodes/second : " << int(nodes / (e / 1000.0)) << endl; + << "\nNodes/second : " << 1000 * nodes / e << endl; }