1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-04-30 08:43:09 +00:00

Micro optimize reduction_parameters()

At ply == OnePly (common case) we avoid some useless
floating point computation.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba 2010-01-28 12:39:15 +01:00
parent a0005ba45f
commit 1d7a3f26e0

View file

@ -2717,7 +2717,7 @@ namespace {
// red = baseReduction + ln(moveCount) * ln(depth / 2) / reductionInhibitor;
//
logLimit = depth > OnePly ? (1.0 - baseReduction) * reductionInhibitor / ln(depth / 2) : 1000.0;
gradient = ln(depth / 2) / reductionInhibitor;
gradient = depth > OnePly ? ln(depth / 2) / reductionInhibitor : 0.0;
}