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

Remove a useless optimization

This optimization is aimed at old hardware only (withouth popcount), and even on
non popcount compile (ARCH=x86-64), it provides no mesurable speedup:

stat        test     master     diff
mean   2,341,779  2,354,699  -12,920
stdev     12,910     14,770   18,150

speedup      -0.55%
P(speedup>0)  23.8%

No functional change.

Resolves #187
This commit is contained in:
lucasart 2015-01-03 19:29:00 +08:00 committed by Joona Kiiski
parent c7332d5610
commit a6e292034a

View file

@ -534,7 +534,7 @@ namespace {
b = weak & ~ei.attackedBy[Them][ALL_PIECES]; b = weak & ~ei.attackedBy[Them][ALL_PIECES];
if (b) if (b)
score += more_than_one(b) ? Hanging * popcount<Max15>(b) : Hanging; score += Hanging * popcount<Max15>(b);
b = weak & ei.attackedBy[Us][KING]; b = weak & ei.attackedBy[Us][KING];
if (b) if (b)