Use std::vector to implement HashTable

Allows some code semplification and avoids directly
allocation and managing heap memory.

Also the usual renaming while there.

No functional change and no speed regression.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba
2012-03-31 12:15:57 +01:00
parent 304deb5e83
commit 32c504076f
9 changed files with 83 additions and 110 deletions

View File

@@ -903,8 +903,8 @@ void Position::do_move(Move m, StateInfo& newSt, const CheckInfo& ci, bool moveI
}
// Prefetch pawn and material hash tables
Threads[threadID].pawnTable.prefetch(st->pawnKey);
Threads[threadID].materialTable.prefetch(st->materialKey);
prefetch((char*)Threads[threadID].pawnTable.entries[st->pawnKey]);
prefetch((char*)Threads[threadID].materialTable.entries[st->materialKey]);
// Update incremental scores
st->value += pst_delta(piece, from, to);