]> git.sesse.net Git - stockfish/commit - src/syzygy/tbprobe.h
StateInfo is usually allocated on the stack by search()
authorMarco Costalba <mcostalba@gmail.com>
Mon, 11 Apr 2016 14:45:36 +0000 (16:45 +0200)
committerMarco Costalba <mcostalba@gmail.com>
Sun, 17 Apr 2016 06:29:33 +0000 (08:29 +0200)
commit7eaea3848c9e8a388c0b79cee6fba6bf3cd32108
tree161affd5cfafe6db23ff2f4132f58489dd45bf5d
parentee7a68ea5fc07e331df462b10f35dc770e9409c5
StateInfo is usually allocated on the stack by search()

And passed in do_move(), this ensures maximum efficiency and
speed and at the same time unlimited move numbers.

The draw back is that to handle Position init we need to
reserve a StateInfo inside Position itself and use at
init time and when copying from another Position.

After lazy SMP we don't need anymore this gimmick and we can
get rid of this special case and always pass an external
StateInfo to Position object.

Also rewritten and simplified Position constructors.

Verified it does not regress with a 3 threads SMP test:
ELO: -0.00 +-12.7 (95%) LOS: 50.0%
Total: 1000 W: 173 L: 173 D: 654

No functional change.
12 files changed:
src/benchmark.cpp
src/endgame.cpp
src/position.cpp
src/position.h
src/search.cpp
src/search.h
src/syzygy/tbprobe.cpp
src/syzygy/tbprobe.h
src/thread.cpp
src/thread.h
src/timeman.cpp
src/uci.cpp