]> git.sesse.net Git - stockfish/commit
Retire RootNode template
authorlucasart <lucas.braesch@gmail.com>
Mon, 18 Jan 2016 22:20:16 +0000 (22:20 +0000)
committerJoona Kiiski <joona@zoox.com>
Mon, 18 Jan 2016 22:21:42 +0000 (22:21 +0000)
commit28933a580eeb4b9a2d717f06c789a6c13dfef19c
tree6bc0fa0e38432443a411eb41a75cb3857421662e
parent12eb345ebd9d93114ce26b8bdc6095245e8149c4
Retire RootNode template

There is no reason to compile 3 different copies of search(). PV nodes are on
the cold path, and PvNode is a template parameter, so there is no cost in
computing:

const bool RootNode = PvNode && (ss-1)->ply == 0;

And this simplifies code a tiny bit as well.

Speed impact is negligible on my machine (i7-3770k, linux 4.2, gcc 5.2):

            nps   +/-
test    2378605  3118
master  2383128  2793
diff      -4523  2746

Bench: 7751425

No functional change.

Resolves #568
src/search.cpp