Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: simple question about bitboards

Author: Gerd Isenberg

Date: 10:17:22 03/27/03

Go up one level in this thread


On March 27, 2003 at 10:06:47, Dezhi Zhao wrote:

>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
>
>To my best knowlege, there is no such well known trick for the most significant
>bit.
>
>Maybe we can send a wish list to Intel and AMD for some new instructions.
>To seed the list:
>
>1. bsfr : bit scan forward and reset
>2. bsrr : bit scan backward and reset
>
>requirements: NOT in slow microcode or latency <= 2 cycle:)
>
>dzhao

Agreed - at least  bsf, bsr, btr reg64,reg64 <= 2 cycles each ;-)

Gerd



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.