Define Score as an enum

Increases performance because now we use one integer
for both midgame and endgame scores.

Unfortunatly the latest patches seem to have reduced a bit
the speed so at the end we are more or less at the same
performance level of the beginning. But this patch series
introduced also some code cleanup so it is the main reason
we commit anyway.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba
2009-11-07 22:21:50 +01:00
parent fea46a8212
commit ef6fca98a0
7 changed files with 83 additions and 83 deletions

View File

@@ -148,8 +148,8 @@ namespace {
else if (token == "eval")
{
EvalInfo ei;
cout << "Incremental mg: " << RootPosition.value().mg()
<< "\nIncremental eg: " << RootPosition.value().eg()
cout << "Incremental mg: " << mg_value(RootPosition.value())
<< "\nIncremental eg: " << eg_value(RootPosition.value())
<< "\nFull eval: " << evaluate(RootPosition, ei, 0) << endl;
}
else if (token == "key")