Skip to content

Commit

Permalink
added log to calculate database probing time
Browse files Browse the repository at this point in the history
fixing LeelaChessZero#1768
we brought one
  • Loading branch information
KarlKfoury authored Aug 30, 2024
1 parent 0c65aa6 commit c48f5a7
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();
auto duration = std::chrono::duration_cast<std::chrono::microseconds>(end - start);
if (duration.count() > 1) {
std::cout << "Time taken: " << duration.count() << " microseconds" << 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 c48f5a7

Please sign in to comment.