]> git.sesse.net Git - stockfish/commit
Speed up polynomial material imbalance loop
authorMarco Costalba <mcostalba@gmail.com>
Sat, 8 Aug 2009 12:06:50 +0000 (13:06 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Sat, 8 Aug 2009 13:12:04 +0000 (14:12 +0100)
commit339bb8a524a0a6af093b383da9f61b31504be9fe
tree6be999a68159629a79164fd96fec44bb4a0df312
parentaa925a0e2905042a978860a75798398cb79b2600
Speed up polynomial material imbalance loop

Access pos.piece_count() only once and avoid some
branches in the inner loop.

Profiling with VTune shows a 20% speed improvement in
get_material_info(), and it is also a bit more cleaned
up this way ;-)

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/material.cpp