Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Move structure

Author: Russell Reagan

Date: 13:11:38 02/23/04

Go up one level in this thread


On February 23, 2004 at 10:51:54, Omid David Tabibi wrote:

>The question is, was it worth the time to do the change? Wouldn't it be better
>to spend the time parallelizing Tiger (i.e., Deep Tiger)?
>
>I have 32 bits for move, and changing it to 16 bits is in my todo queue for a
>long time (more than a year). But there are always more important things to do.

Surely you didn't put 'unsigned long' all over your program did you? :) Using a
typedef makes this a one line change:

typedef unsigned long MoveType;

to...

typedef unsigned short MoveType;

I have recently taken up stuffing everything into a class so I can make these
kinds of changes very quickly and see what works best. There are other
advantages too, at neglibile (if any) run-time speed penalties. I could switch
between 16-bits, 32-bits, or a struct, and make only trivial changes to a few
lines of code.

Even if you're using C and have no classes, it will probably be very beneficial
to touch the actual data as little as possible, using typedefs and macros or
inline functions instead.



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.