Author: Russell Reagan
Date: 08:29:21 01/21/03
Go up one level in this thread
On January 21, 2003 at 05:46:37, Bas Hamstra wrote: >Question: Why do you calculate KnightAttacks the way you do? Why not simply > > KnightAttacks(Sq) = KnightAttMask[Sq]; You are right. That would be faster. When I wrote that, I was thinking in "fill" mode and was not using any lookup tables. >One memory lookup in a small precalculated table KnAtt[64] should be much much >faster. For the rest I am interested to test the speed of the C-style fill >routines against rotated BB. Will be slower, but how much? I am really not sure. I wrote a program using those functions, and it was less than 1/4th the speed of Crafty when you calculate the nps from perft. Dann Corbit took a look at it and he doubled my speed with only making a few changes, and he is of the opinion that you could be faster than Crafty using these methods. I was calling these nested functions, and in doing so I was passing bitboards by value all over the place, and that was one reason why my program was so slow. I think there are a lot of things that you can do to speed things up. Using a combination of lookup tables and fill routines might be able to produce something very fast, but I'm not sure. When I wrote these, I was only playing around with new ideas, trying to get a good understanding of them, so I'm sure there is quite a bit of room for improvement in terms of speed.
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.