Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Question about data structures

Author: Bruce Moreland

Date: 15:02:47 12/01/98

Go up one level in this thread



On November 30, 1998 at 12:01:05, Tom Kerrigan wrote:

>This is all fine and good for larger arrays that you don't access a lot, but if
>you're talking about your representation of the board,
>
>int chess_board[64];
>
>will be a serious win over
>
>char chess_board[64];

I don't know why you are saying this in the face of at least two people saying
that they tried this exact thing and it was slow.

On an Intel machine you have to do an extra instruction to read a char into EAX,
unless you use movzx or movsx, which suck.

On an Alpha you have to deal with the alpha (21164) not even having an
instruction that will read a byte.

These are reasons why I intuit that it might go slower, but if I used this data
structure I would surely test it and know for sure.

I think that discussions of which implementation will go faster, that are based
upon predicted instruction timing or cache behavior, are almost always useless.

bruce



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.