Author: Dave Gomboc
Date: 07:45:50 09/11/03
Go up one level in this thread
On September 10, 2003 at 17:14:02, Steven Edwards wrote: >On September 10, 2003 at 13:20:50, Robert Hyatt wrote: >>On September 10, 2003 at 12:38:17, Steven Edwards wrote: > >>You should look at the code more carefully... >> >>Crafty dynamically computes "nodes_between_time_checks" so that it is a >>bigger number on faster machines, smaller on slower machines. I set it so >>that I check every "reasonable" unit of time. For normal time controls, say >>40 moves in 2 hours, I check no more than once per second. For bullet (game >>in 1 minute) I check much more frequently. > >Yes, I did see all the places in Crafty where nodes_between_time_checks gets >different values plus the various references to nodes_per_second (and to >average_nps), so I agree that it works. But I say that the timer thread method >gives a more uniform result with less code. > >>That works ok. The overhead for scheduling a thread every N units of time is >>a bit of a pain. > >Since the timer thread has to be launched only once per search (or only once per >program invocation depending on how it's set up), the pain here must be the time >used by recurring system calls and context switches caused by the usleep() >reference. I am sure you are correct that there is some overhead involved here, >but in my tests with usleep() intervals down to 10 ms I have been unable to see >any measurable slowdowns. Bob uses to use a separate thread for the user interface, but yanked that code to support DOS due to high demand. :-) Possibly his search abort handling also dates from that long time ago. Dave
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.