mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-20 09:06:45 +08:00
Speculative prefetch
Idea by Peter Oesterlund. Implemented and tested by Joerg Oester STC 3 threads ELO: 3.19 +-2.1 (95%) LOS: 99.9% Total: 40000 W: 7576 L: 7209 D: 25215 LTC LLR: 2.96 (-2.94,2.94) [0.00,6.00] Total: 22026 W: 3829 L: 3619 D: 14578 STC LLR: 2.95 (-2.94,2.94) [-1.50,4.50] Total: 7291 W: 1531 L: 1404 D: 4356 No functional change Resolves #61
This commit is contained in:
@@ -788,6 +788,9 @@ moves_loop: // When in check and at SpNode search starts from here
|
||||
}
|
||||
}
|
||||
|
||||
// Speculative prefetch
|
||||
prefetch((char*)TT.first_entry(pos.hash_after_move(move)));
|
||||
|
||||
// Check for legality just before making the move
|
||||
if (!RootNode && !SpNode && !pos.legal(move, ci.pinned))
|
||||
{
|
||||
@@ -1137,6 +1140,9 @@ moves_loop: // When in check and at SpNode search starts from here
|
||||
&& pos.see_sign(move) < VALUE_ZERO)
|
||||
continue;
|
||||
|
||||
// Speculative prefetch
|
||||
prefetch((char*)TT.first_entry(pos.hash_after_move(move)));
|
||||
|
||||
// Check for legality just before making the move
|
||||
if (!pos.legal(move, ci.pinned))
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user