Try to prefetch as soon as position key is ready

Move prefetching code inside do_move() so to allow a
very early prefetching and to put as many instructions
as possible between prefetching and following retrieve().

With this patch retrieve() times are cutted of another 25%

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba
2009-08-09 15:53:51 +01:00
parent cd4604b05c
commit 4251eac860
4 changed files with 74 additions and 45 deletions

View File

@@ -98,6 +98,7 @@ struct StateInfo {
StateInfo* previous;
};
class TranspositionTable;
/// The position data structure. A position consists of the following data:
///
@@ -258,6 +259,7 @@ public:
void undo_move(Move m);
void do_null_move(StateInfo& st);
void undo_null_move();
void setTranspositionTable(TranspositionTable* tt);
// Static exchange evaluation
int see(Square from, Square to) const;
@@ -356,6 +358,7 @@ private:
File initialKFile, initialKRFile, initialQRFile;
StateInfo startState;
StateInfo* st;
TranspositionTable* TT;
// Static variables
static int castleRightsMask[64];