]> git.sesse.net Git - stockfish/commit
Micro optimize pretty_pv
authorMarco Costalba <mcostalba@gmail.com>
Mon, 8 Jun 2009 09:52:03 +0000 (10:52 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Mon, 8 Jun 2009 09:52:03 +0000 (10:52 +0100)
commitb8ab5d533b8e7e3b12d6768745f407f7f9f8f434
treeee971847d80d63b987d2a896f0efe7368bd72fca
parentbbd3e30b4e297877f1e1cad3e5b942175c58290b
Micro optimize pretty_pv

Creating an History object requires clearing the History tables,
although fast is an useless job in san.cpp where History is used
just as a dummy argument for MovePicker c'tor.

So use a file scoped constant instead of creating a new History()
object each time MovePicker c'tor is called as in move_ambiguity()

This optimizes pretty_pv() through the following calling chain:
pretty_pv() -> line_to_san() -> move_to_san() -> move_ambiguity()

No functional change.

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