Author: Frank Phillips
Date: 03:59:38 09/26/99
Go up one level in this thread
On September 25, 1999 at 18:52:30, Dan Newman wrote: >On September 25, 1999 at 06:59:06, Frank Phillips wrote: > >>My program compiled with MSVC++ 6 (Enterprise) is almost 30% slower than the >>same code with the same options compiled with MSVC++V5, which is a bit >>disappointing. The simple test I did was a fixed depth search for six middle >>game positions. More worrying than the decrease in speed is the number of nodes >>to reach the fixed depth which have increased under VC6. >> >>Usual type of program – PVS with hash tables. Mixture of bitboards and offset >>arrays. >> >>What am I missing? >> >>Frank > >I once had a problem like this when compiling with different compilers >(Watcom, MS, GNU)--I got a different answer with each. I finally traced >it down to my use of the qsort() routine, which I used to sort moves at >the root. Each compiler had a different implementation of course. I >quickly replaced it with some C code. > >You could try compiling with optimizations off and see what happens. >I'm not sure what that would tell you though; I guess it wouldn't >pin down whether it's your code or the compiler. (In 25 yrs of >programming I've only found perhaps 3 bugs that I could attribute >to the compiler. There were of course a larger number of bugs that >I never figured out.) > >I guess what I would do is look in detail at the node count for each ply >to see where it starts going wrong (the earlier the better). I'd look >for a position that displays this difference early on, if possible. Then >I'd put in a lot of print statements to see what's different, etc. > >-Dan. I traced the bug (a bug!) to the Sort() function used to select the next move, which I had forgotten was not recursive and so did not save the status of local variables to the stack :-( VC6 and VC5 see about equal now. Frank
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.