Author: Christophe Theron
Date: 10:51:01 02/22/04
Go up one level in this thread
On February 21, 2004 at 17:22:11, Russell Reagan wrote:
>On February 21, 2004 at 16:52:58, Christophe Theron wrote:
>
>>The move type in Chess Tiger is a 16 bits unsigned int (2 bytes). However I do
>>not store the pieces (moved/captured) in the move itself. The only piece
>>information stored in the move is the new piece in case of a promotion.
>>
>>I used to have a 32 bits unsigned int move type 3 years ago (4 bytes) and used
>>to consider it as very inefficient... I changed it in Chess Tiger 13.
>
>Does it really make a big difference on a PC? How about on a PDA? Or does it
>just make you cringe to waste 2 bytes per move? :)
Wasting a resource is inefficient programming. I could store a move in two bytes
efficiently and it even made differenciating between regular moves and special
moves like castling, promotion and en passant capture easier. So why would I use
4 bytes when I can use 2 bytes with no loss of performance?
And yes, I always program with modest hardware in mind. Using 2 bytes for a move
is also good for a PDA program or on 16 bits hardware.
Christophe
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.