From: cj5716 <125858804+cj5716@users.noreply.github.com> Date: Tue, 31 Oct 2023 00:25:06 +0000 (+0800) Subject: Prefetch TT entries in probcut X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=e277dda7166992536124891e212d6d6a866f8a12 Prefetch TT entries in probcut Passed STC: LLR: 2.93 (-2.94,2.94) <0.00,2.00> Total: 101344 W: 25893 L: 25491 D: 49960 Ptnml(0-2): 303, 11350, 26991, 11698, 330 https://tests.stockfishchess.org/tests/view/6540daa6cc309ae83956669b slight speedup: ``` Result of 100 runs ================== base (./stockfish.master ) = 1170705 +/- 3133 test (./stockfish.patch ) = 1174545 +/- 2895 diff = +3841 +/- 3196 speedup = +0.0033 P(speedup > 0) = 0.9907 ``` closes https://github.com/official-stockfish/Stockfish/pull/4856 No functional change --- diff --git a/src/search.cpp b/src/search.cpp index daab1eb1..6e719be8 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -869,6 +869,9 @@ Value search(Position& pos, Stack* ss, Value alpha, Value beta, Depth depth, boo { assert(pos.capture_stage(move)); + // Prefetch the TT entry for the resulting position + prefetch(TT.first_entry(pos.key_after(move))); + ss->currentMove = move; ss->continuationHistory = &thisThread