Author: James Swafford
Date: 07:57:27 02/22/01
Go up one level in this thread
Have you tried compiling under Cygwin? (www.cygwin.com) It's a free win32 port for gcc. It may be much easier to produce a win executable with that... and on the tests I've done the cygwin binaries were faster than the MSVC 6 binaries with full optimizations. As far as checking for input every N nodes - this conversation recently came up with David. Why not just spawn off a thread to wait for user input? I've done it and it worked well. The only thing I check "every N nodes" for is time expiration and a global "kill search" flag (indicating, for example, the user input thread may need the search to stop). -- James On February 21, 2001 at 22:34:06, Scott Gasch wrote: >Hi, > >I'm porting my engine to windows. Actually Dann did a really cool thing and got >it to build already over on the other side... now I am just polishing and >cleaning up details. > >Many interesting things have come up... quriks and whatnot. > >I'm stuck on one right now and before I do the drastic to work around it, I >wondered if anyone had some advice. I needed some code to do the same thing as >"select" on UNIX (is there input on this file descriptor?). So after reading >MSDN, Tim Mann's site and crafty code I came up with PeekNamedPipe and/or >GetNumberOfConsoleInputEvents solution. > >Problem: when searching my code is checking for input every N nodes... and not >performing well because CSRSS.EXE is eating about 40% of the processor. This is >due to my new "select" code. When I remove it I gain, literally, 100knps. >What's the deal with this? I have always heard that console mode windows is a >nightmare but never expected this kind of stupidity. Anyone have a better way? > >Thanks, >Scott
This page took 0.01 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.