Reallocate TT on threadpool resize.
authorJoost VandeVondele <Joost.VandeVondele@gmail.com>
Sat, 2 Jun 2018 15:02:23 +0000 (17:02 +0200)
committerStéphane Nicolet <cassio@free.fr>
Sat, 2 Jun 2018 15:03:01 +0000 (17:03 +0200)
commit6cc56141245abec88861e38e0a44615e4d675813
treefabf099dd699102f290ee5b539c591f3e01ea053
parent31b82432729fe7a957b84f2c8189c54f401a855f
Reallocate TT on threadpool resize.

Makes sure the potential benefit of first touch does not depend on
the order of the UCI commands Threads and Hash, by reallocating the
hash if a Threads is issued. The cost is zeroing the TT once more
than needed. In case the prefered order (first Threads than Hash)
is employed, this amounts to zeroing the default sized TT (16Mb),
which is essentially instantaneous.

Follow up for https://github.com/official-stockfish/Stockfish/pull/1601
where additional data and discussion is available.

Closes https://github.com/official-stockfish/Stockfish/pull/1620

No functional change.
src/main.cpp
src/thread.cpp
src/tt.cpp