Skip to content

Commit

Permalink
Consistent TT replace policy
Browse files Browse the repository at this point in the history
This fixes an inconsistency bug where TT entries were valued differently
depending on which pointer they were accessed through.

STC 2MB
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 11301 W: 2176 L: 2038 D: 7087

LTC 8MB
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 17732 W: 2870 L: 2745 D: 12117

STC 16MB
LLR: 2.96 (-2.94,2.94) [-4.00,0.00]
Total: 17401 W: 3324 L: 3227 D: 10850

Bench: 8248164

Resolves #377
  • Loading branch information
mstembera authored and zamar committed Jul 15, 2015
1 parent 3054db9 commit d8aeaab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ TTEntry* TranspositionTable::probe(const Key key, bool& found) const {
// Find an entry to be replaced according to the replacement strategy
TTEntry* replace = tte;
for (int i = 1; i < ClusterSize; ++i)
if ( (( tte[i].genBound8 & 0xFC) == generation8 || tte[i].bound() == BOUND_EXACT)
if ( (( tte[i].genBound8 & 0xFC) == generation8)
- ((replace->genBound8 & 0xFC) == generation8)
- (tte[i].depth8 < replace->depth8) < 0)
replace = &tte[i];
Expand Down

0 comments on commit d8aeaab

Please sign in to comment.