Skip to content

Commit 7c7fe32

Browse files
anematodevondele
authored andcommitted
Merge HalfKA and Threats accumulators
Passed STC (https://tests.stockfishchess.org/tests/view/6a2893ad7c758d82accea129): LLR: 3.20 (-2.94,2.94) <0.00,2.00> Total: 23328 W: 6145 L: 5838 D: 11345 Ptnml(0-2): 50, 2463, 6346, 2740, 65 Instead of repeatedly doing the sum HalfKA + threats at the end, it's profitable to simply store one accumulator per side that combines them. This also avoids an extra/load store of an accumulator, and halves the cache footprint of the accumulators. For full refreshes, we always compute both halfka and threats simultaneously. Any threat full refresh is always a halfka refresh because it occurs when the king crosses the center line, while halfka refreshes are required for ANY king move, so we don't need a separate detection path for threats. I get about a 2.5% speedup locally with this, but I'd appreciate other ppl's measurements. closes #6890 No functional change
1 parent 0111d11 commit 7c7fe32

3 files changed

Lines changed: 272 additions & 498 deletions

File tree

0 commit comments

Comments
 (0)