Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: simple question about bitboards

Author: Robert Hyatt

Date: 06:36:45 03/27/03

Go up one level in this thread


On March 27, 2003 at 05:35:10, Uri Blass wrote:

>If I want to get rid of the least significant 1 of a BitBoard
>I do for a bitboard a
>a&=a-1
>
>What is the fastest way to get rid of the most significant 1 of
>a bitboard?
>
>Is it slower than a&=a-1 and how much slower?
>(it cannot be faster otherwise popcount of crafty could use it).
>
>Uri


Probably the best you can do is to find the first bit, then use a mask indexed
by
that number to turn the bit off.  There's no equivalent to the least bit
clearing trick
you mentioned.



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.