Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Question for Gerd: reduce rbb lookup tables

Author: Sune Fischer

Date: 16:38:40 07/14/03

Go up one level in this thread


On July 14, 2003 at 18:59:16, Gerd Isenberg wrote:
>
>Read again, the ShiftL45[s] lookup is not necessary.
>
>__forceinline
>BitBoard A1H8Attacks(unsigned int sq) const
>{
>  return sA1H8Atta[sq]
>   [(*(((BYTE*)&(m_OccuBBA1H8))+((sq-Rank(sq))&7))&0x7e)>>1];
>   // diaindex = (file-rank) & 7
>}
>
>Gerd
>

Thanks Gerd, I'll think it over.

My transformation is a little different I think, though you also have one shift
and one AND, you've just replaced the table with some "magic", could be faster I
guess.

I once heard that working with byte size variables is slower than native
integers (32 bit) sizes, so I'm not fully convinced 8 bit casting it that much
faster(?).

-S.



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.