Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Two questions: FirstOne() in Crafty and BSF/BSR

Author: Gian-Carlo Pascutto

Date: 05:37:48 08/08/02

Go up one level in this thread


On August 08, 2002 at 08:11:13, Vincent Diepeveen wrote:


>>This is very short, but in tests with my Athlon XP, it is no faster than the
>>version with branches and checks for zeroed bitmaps.
>
>that's of course a dumb test to do. you should try each time a random
>chosen bitmap.

I think you misread what he wrote. He didn't test with zero bitmaps.

The problem of the short routine is that bsf is very slow on the Athlon,
and it can only be handled by the vector decoder.

In a bitboard program, typical case is to have an empty half-bitboard, and
avoiding the bsf is faster even if it's occasionally mispredicted.

--
GCP



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.