Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: CilkChess question for Don

Author: Bruce Moreland

Date: 17:02:37 01/31/99

Go up one level in this thread


My program is single-processor single-threaded, and runs on Windows NT.  I
decided to see what would happen if I added critical section locking to my hash
table.

I added something to the effect of ...

   EnterCriticalSection(&argcs[hash.key & 1023]);

... at the start of my hash table probe, a corresponding call to
"LeaveCriticalSection" at the end of this function, another pair around the guts
of my hash table store function, and a third pair around pawn structure
probe/evaluate/store, and my speed dropped by approximately 10%

This is in the single-threaded app.  There would be additional problems if I got
collisions when dealing with multiple processors, but using 1024 critical
sections should mnimize this, I think.

I had been wondering about this myself, I'm glad Bob asked the question.

The possibility of a mis-probe would be pretty high without locking, I'd think.

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.