Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: A question about speed and bitboard

Author: Robert Hyatt

Date: 17:52:19 09/17/04

Go up one level in this thread


On September 16, 2004 at 21:20:50, Uri Blass wrote:

>What is faster doing a loop on the 1's of a bitboard or doing a loop on array of
>integers
>
>I simply consider to change my knight move generator to bitboards
>
>Today I have array
>int knightmove[64][8] and the question is if getting
>knightmove[c3][0],...knightmove[c3][7] is faster or slower than getting the same
>squares by calculating the 1's of knightoption[c3] in order to get the squares
>that the knight can go.
>
>I also consider to have bitboard knightcapturewhite[64] knightcaptureblack[64]
>and knightquietmoves[64] that are going to be updated incrementally after every
>move and the question is what is the price of this in speed.
>
>Do people who use bitboards have experience with it?
>
>Uri


You are asking the wrong question.  Bitboards are simply a way of doing
_everything_ differently from array-based board representations.  There are
gains and losses (of course you should ignore the naysayers like you-know-who as
bitboards can and do work fine).  But when you start to mix things, the only way
to see if it is faster is to simply implement and test.  That's what I did with
rotated bitboards when I first thought of the idea.  It seemed like a good idea,
but there were issues to overcome...  It takes time and testing...




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.