Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: A question about speed and bitboard

Author: Gerd Isenberg

Date: 00:59:30 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

Guessing you want square indicies, clearly traversing an array of integer is
faster, because you don't need the rather expensive bitscans or log2(singlebit).

>
>I simply consider to change my knight move generator to bitboards
>

Probably a bad idea to do it only for knights.
Do it for all pieces or not.

As Michael already meantined, working in the setwise 2**sq world has the
advantage to combine sets with simple boolean or setwise operations, eg. finding
capture targets, targets which fork heavy pieces, targets attacked by opposite
pawns, etc.


>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?

Today in make move i only update some piece bitboards, hash, mb and some castle-
ep- flags. All attacks stuff is generated on the fly. I tried an other approach
with my former dos program. A lot of incremental update, even enprised pieces.

It probably depends on how many lazy leaf nodes you have, whether an expensive
incremental update pays off.

Gerd

>
>Uri



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.