Skip to content

Commit

Permalink
logging if tablebase probing duration > 1s
Browse files Browse the repository at this point in the history
adressing issue LeelaChessZero#1768
  • Loading branch information
KarlKfoury authored Aug 30, 2024
1 parent 4045a1c commit 943ab53
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/syzygy/syzygy.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1406,9 +1406,13 @@ class SyzygyTablebaseImpl {
}
idx = type != DTM ? encode_pawn_f(p, ei, be) : encode_pawn_r(p, ei, be);
}

auto start = std::chrono::high_resolution_clock::now();
uint8_t* w = decompress_pairs(ei->precomp, idx);

auto end = std::chrono::high_resolution_clock::now();
std::chrono::duration<double> duration = end - start;
if (duration.count() > 1) {
std::cout << "Tablebase probing duration: " << duration.count() << " seconds" << std::endl;
}
if (type == WDL) return static_cast<int>(w[0]) - 2;

int v = w[0] + ((w[1] & 0x0f) << 8);
Expand Down

0 comments on commit 943ab53

Please sign in to comment.