]> git.sesse.net Git - stockfish/commitdiff
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)
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>

No differences found