Author: Chuck
Date: 15:37:50 02/22/01
Go up one level in this thread
On February 22, 2001 at 14:17:54, Scott Gasch wrote: >On February 22, 2001 at 10:57:27, James Swafford wrote: > >> >>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. > >In my experience gcc (or cygwin) is inferior to MSVC. It could be that one is >better than the other at translating certain constructs, though. > >> >>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). > >Well, this is an idea but I want the code to remain platform-independent. >Creating a thread is easy on win32 but not so easy to do in an independent way >on the different unixes. The real question is why the hell CSRSS.EXE is so >brain dead. > >Thanks for the ideas anyway, James and Peter. > >Scott > > >> >> >>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 I think spinning off a thread is the best answer. I expected the standard C functions for this would work OK on Unix, however. PeekNamedPipe, etc. has always seemed to be quirky in my experience. Besides, it doesn't port to Unix either, right? In any case, by my experience, kicking off a thread is easiest and gives the best performance in Windows. Regards, Chuck
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.