Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Design choices in Crafty

Author: Dezhi Zhao

Date: 13:30:30 06/24/04

Go up one level in this thread


On June 24, 2004 at 16:00:16, Dieter Buerssner wrote:

>On June 24, 2004 at 11:56:54, Dezhi Zhao wrote:
>
>>On June 24, 2004 at 11:17:50, Robert Hyatt wrote:
>>
>>>On June 24, 2004 at 09:03:57, Gian-Carlo Pascutto wrote:
>
>>>>2) You need to handle the branch too. The cost of that is going to be way
>>>>higher than the cost of setting up/restoring a register.
>>>
>>>
>>>That branch is probably predicted perfectly.  it is "yes" "no" "yes" "no".
>>>something the PIV handles well although others do not.
>
>I don't think, that it really matters (speed wise), but I would assume, that it
>is not a simple yes no yes no sequence. You can hit qsearch, and no capture
>moves are possible. You retract one move, and hit qsearch again, with the same
>color to move. Both time eval is called with the same wtm. In other cases, your
>yes no sequence will happen. But to me, it doesn't look very predictable at all.

At least PIV can do the prediction though it may not be a simple pattern.  I
mean in the previous post that a CPU can lose its track of the mentioned branch
if it meetsmuch code in bewteen.

>Neither would I think, that it influences speed much (branch predicted correctly
>or not). I think, like Gerd, the main issue is easiness of changing the code and
>the chance to code some bugs. With basically duplicated code, the probability
>for errors will be higher.

partially agreed. However, you can still wrap it up by using inline functions,
templates or even macros.

>
>I did some speed test for my incheck function. Coding it seperately for white
>and black produces somewhat better code. In practice, I found no speed
>difference.
>
>Regards,
>Dieter



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.