]> git.sesse.net Git - stockfish/commit
Use bsfq asm instruction to count bits
authorMarco Costalba <mcostalba@gmail.com>
Fri, 3 Jul 2009 07:28:13 +0000 (08:28 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Fri, 3 Jul 2009 08:18:14 +0000 (10:18 +0200)
commita87ea9846d4adc8d2ed8107c072c43b5ef53e4fe
tree34892a85c594c510ed64613deda5ad2ee855c4a6
parent063e2441b17b8260de443b3d580f49b3d65d03c7
Use bsfq asm instruction to count bits

On 64 bit systems we can use bsfq instruction to count
set bits in a bitboard.

This is a patch for GCC and Intel compilers to take advantage
of that and get a 2% speed up.

Original patch from Heinz van Saanen, adapted to current tree
by me.

No functional change.

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