Author: Robert Hyatt
Date: 09:16:55 07/18/02
Go up one level in this thread
On July 18, 2002 at 12:08:11, Steffen Jakob wrote: >Hi Bob! > >On July 18, 2002 at 11:52:39, Robert Hyatt wrote: > >>>Calculating <421 is faster than calculating 7*INCPLY again and again. >> >> >>Speed is not an issue for the calculation. if INCPLY is a constant, then >>the compiler realizes 7*INCPLY is _also_ a constant and will produce the code >>using the constant 420 rather than doing the calculation. >> >>The reason it is a constant (magic number as Steffen said) is that as I tested >>this, I played with a _lot_ of different values, and I found things like >>6*INCPLY+30 to be tedius to type. Once I settled on 7*INCPLY I should have >>used that to make it more readable of course, and I will fix this (and others) >>as I notice them. > >Because I had a look at SwapXray yesterday I remember that the direction numbers >are "magic" too :-) > >Same for the usage of 'a&7', 'a>>3' or 'outside&192'. > >Another thing I remember is that the EXTENSIONS type from chess.h is unused. >Same for FAIL_LOW_POS. Extensions was a debugging tool. IE I used to have a parallel array with the PV in one element and the extensions for that ply in another. Then when I dumped the PV I could see which plies had extensions applied. I took that out a long time back to save the time of backing up the stuff when I really didn't care except on rare occasions during debugging. The rest are simply carry-overs. To me a&7 is clearer than a&CONST where I might not remember which bits are on in CONST... > >Greetings, >Steffen.
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.