Author: Alessandro Damiani
Date: 11:28:03 01/17/04
Go up one level in this thread
>>>>I read about Crafty using these smaller tables here in CCC. I like it, 128kByte >>>>instead of 512kByte. I guess the additional cost for shifting and anding is >>>>negligible, isn't it? >>>> >>>>Alessandro >>> >>> >>>There is really no extra cost when you think about it. >>> >>>Before I had to shift right N bits to move the diag contents to the right >>>end of the register, then AND with 255 to extract just the right 8 bits. >>> >>>Now I shift right 1 more bit, and AND with 63 instead. Absolutely free. >>> >>>:) >> >>I see now that my question was misleading. I meant in the context of Rotated >>Indices, where these two instructions would be an additional cost. For instance, >>the macro to determine attacked squares in the direction right up is now >> > >It wasn't misleading at all. I'd like to take the testicles of the guy that >invented these "laptop scratchpads" and ... > I am lucky not being that guy. :) :) >I was responding to something else, but when I hit the scratchpad, I moved it >and happened to click on your message. Without noticing the context, I then >responded as though it were about how I am doing the rotated lookup now with >the 64x64 tables rather than 64x256. I had known about this reduction for >quite a while as several had mentioned it in the past. But since almost >all machines were faster with the -DCOMPACT_ATTACKS stuff, I never took the >time to fix this. But on the Opteron, compact attacks were slower so I decided >to go ahead and fix things properly, and after doing so, it turned out to be >close to the speed of compact attacks so I dumped that compact stuff completely >to simplify the code. > I see. I didn't think of how to improve attack detection until now. Since there were other parts of my engine that were not sophisticated at all my focus was on these parts and I didn't care of attack detection. >>I am going to test the smaller tables. > >While I am not doing it exactly as he does, I found the 75% memory reduction >helped performance. Great! Everytime I think I found the best way to do something there is an improvement. At least we have something to enjoy when we are 80 years old....apart from family....and pizza. ;) Alessandro
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.