Author: Robert Hyatt
Date: 21:07:56 06/26/02
Go up one level in this thread
On June 26, 2002 at 04:50:00, Daniel Clausen wrote: >On June 25, 2002 at 19:56:26, Robert Hyatt wrote: > >>I do this because it is faster on 32 bit machines than hunting thru the >>various bitmaps to find what is on square E6, for example. It would be >>possible to change my move format and my move generator so that the captured >>piece is not included. Then this 64 word array could be discarded. > >I don't follow your logic. Whether your move format includes the captured piece >type or not, how does that help you to find out what piece sits on E6? If you want to find out what is on E6 with pure bitmaps, all you can do is AND the bitmask with a 1 on E6, with every piece board you have, until you get a non-zero result. If you anded with white_knights, then you know there is a white knight on e6. Or you can reference board[E6] and directly access the piece value that is on that square. That is the _only_ reason I do it at present... > >And about the "because it is faster on 32 bit machines...".. I would assume that >also on 64bit machines it's a bit stupid/slow to hunt thru the various bitmaps >in order to find out what piece resides on E6. Am I missing something? [and if >so, what? :)] It isn't as slow, by a factor of two. On a 32 bit machine, 2-way superscalar execution, you can check one 64 bitmap per cycle. On a 64 bit machine, still 2-way superscalar, you can check two bitmaps per cycle. That might make it cheap enough to get rid of the char board[64] array totally... > >I plan to keep this 64 word array forever (or change it even to a 0x88 board) >because I think it's the best data structure to answer the question, what piece >resides on E6. > >Sargon At the moment, yes. But when you run on a 4-way superscalar box, it changes even farther. And when 8-way comes along, it becomes more efficient to get rid of the array completely as you can answer that question in one cycle anyway.
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.