Author: Volker Böhm
Date: 15:06:54 09/16/04
Go up one level in this thread
Hi Stuard, if (board[H8+OFFSET] == OFFBOARD) <== mailbox vs. if (((H8+OFFSET) & 0x88))) <== 0x88 method You can´t say anything about time concerning these two compares. What do you check where? Example: If you have a piece list you never have to check if the starting position is in board. Example: Move a white Rook on place to right: if (((Cur_Pos + Right) & 0x88) || (board[Cur_Pos + Right] & white)) // Expensive // Check for OFFBOARD or white: // I Have a bit for "white" one for "black" and one for "offboard" if (board[Cur_Pos + Right] & (offboard | white)) // Less expensive Thus 0x88 is not a speed improvement here.
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.