Skip to content

Commit

Permalink
Remove a useless optimization
Browse files Browse the repository at this point in the history
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
  • Loading branch information
lucasart authored and zamar committed Jan 3, 2015
1 parent c7332d5 commit a6e2920
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/evaluate.cpp
Expand Up @@ -534,7 +534,7 @@ namespace {

b = weak & ~ei.attackedBy[Them][ALL_PIECES];
if (b)
score += more_than_one(b) ? Hanging * popcount<Max15>(b) : Hanging;
score += Hanging * popcount<Max15>(b);

b = weak & ei.attackedBy[Us][KING];
if (b)
Expand Down

0 comments on commit a6e2920

Please sign in to comment.