Computer Chess Club Archives


Search

Terms

Messages

Subject: a question about efficient way to store information

Author: Uri Blass

Date: 05:57:07 04/13/03


Movei of today has an array with the number of the white pawns in every file.

I think that it is a waste of space to use array of 8 integers and it may be
better to use one integer to store the same information.

The question is what is the most efficient way to get the information.

I thought that I can write instead of numwhitefilepawns[i] to have some define
like
#define numwhitefilepawns(i) 7&(numwhitefilepawns>>(3*i))

The question is if this is the best way because I do not like the *

Maybe it is better to have *4 because it can be translated to

#define numwhitefilepawns(i) 7&(numwhitefilepawns>>(i<<2))

I think to use the same idea for more information so my question is what is the
most efficient way to do it.

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.