]> git.sesse.net Git - stockfish/commit
Avoid a double copy when saving a TTEntry
authorMarco Costalba <mcostalba@gmail.com>
Sat, 5 Jun 2010 09:50:24 +0000 (11:50 +0200)
committerMarco Costalba <mcostalba@gmail.com>
Sat, 5 Jun 2010 11:35:44 +0000 (12:35 +0100)
commited2754227a53c38f2570dc92b731c83cf4e0e434
tree85669e5960eba8c6cc85c9fcec6093a49de93b8f
parent287b46aa633cb61762216cb1aed1b246d0ed0802
Avoid a double copy when saving a TTEntry

In statement:

*tte = TTEntry(posKey32, v, t, d, m, generation, statV, kingD);

We first create a TTEntry, then we copy the temporary entry to
its final destination in *tte then we discard the TTEntry.

Instead of this assign the fields directly to the destination TTEntry.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/tt.cpp
src/tt.h