Computer Chess Club Archives


Search

Terms

Messages

Subject: small improvement

Author: Gerd Isenberg

Date: 13:45:16 08/09/03

Go up one level in this thread


On August 09, 2003 at 16:12:28, Gerd Isenberg wrote:

>On August 08, 2003 at 15:53:00, Eugene Nalimov wrote:
>
>>On August 07, 2003 at 15:40:33, Gerd Isenberg wrote:
>>
>>>...
>>>3. bsf, still vector path and 9 cycles.
>>
>>Hmm, on Itanium2 I can do BSF/BSR equivalent in 8/9 clocks without BSF/BSR
>>instructions:
>
>Hi Eugene,
>
>I see, Itanium2 has popcount, thanks for the lession.
>I refered to opteron's bsf, but anyway, nice lession how to use intrinsics.
>My bitscan collection grows and grows ;-)
>
>I'm interested in performance of opterons bsf/btr instructions versus
>Matt Taylor's approach with 64-bit magic de Bruijn multiplication, may be even
>without lookup:
>

oups, i mixed up the prolog from the 32-bit version into the 64-bit one.
It's ok (except lookup table), but with 64-bit without folding, the single
isolated bit is enough for 64-bit de Bruijn mul, one instruction saved:

typedef unsigned long long BitBoard;

int bitScanAndReset(BitBoard &bb)
{
	BitBoard lsb = bb & -bb;
	bb ^= lsb;
	return _tbl64[(lsb * 0x03f08c5392cd5dbd) >> (64 - 6)];
}

Gerd

<snip>



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.