From 1d7a3f26e0ac0d0dabe91806b236f4f411e6344a Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Thu, 28 Jan 2010 12:39:15 +0100 Subject: [PATCH 1/1] Micro optimize reduction_parameters() At ply == OnePly (common case) we avoid some useless floating point computation. No functional change. Signed-off-by: Marco Costalba --- src/search.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/search.cpp b/src/search.cpp index 4e42ca31..76d05001 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -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; } -- 2.39.2