Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Playing the NPS game

Author: Dann Corbit

Date: 10:26:39 09/27/01

Go up one level in this thread


On September 27, 2001 at 04:49:08, Gian-Carlo Pascutto wrote:

>On September 26, 2001 at 22:28:06, Robert Hyatt wrote:
>
>>>Case in point:
>>>
>>>Crafty v18.10
>>>
>>>White(1): perft 6
>>>total moves=119060324  time=51.29
>>>
>>>Sjeng: perft 6
>>>Raw nodes for depth 6: 119060324
>>>Time : 43.34
>>>
>>>--
>>>GCP
>>
>>
>>The critical question then is are you copying any large structs around?  Are
>>you doing a make/unmake or a copy/make approach (copy/make drains the PC
>>memory bandwidth to zero).
>
>Nope. I do make/unmake
>
>My data structures are on the large side, but squeezing them (int->unsigned
>char) only seems to hurt not help.

I have seen very dramatic increase in speed by passing pointers to large objects
instead of the objects themselves.  For instance, if you have an 80 byte struct,
then a blank 80 byte area has to be pushed onto the stack and then the data
copied from the actual struct to the target area.  In the case of recursive
calls, this can become prohibitive.  It may be even more expensive than it looks
from looking at the memory utilization, because you might have a near balance of
pushes and pops during the search.

Of course, this idea only works if you don't need to preserve the contents of
the struct between calls.



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.