Author: Roberto Waldteufel
Date: 22:20:31 11/02/98
Go up one level in this thread
On November 02, 1998 at 22:15:36, jonathan Baxter wrote: >>So in the light of all this, I would suggest that you stick with your rotated >>bitboards if you don't intend to use the PII or PPro platform, but if you do >>intend to use these processors, try doing it the old fashioned way and compare >>them. You may find, as I did, that this can beat the rotated bitboards now that >>bit scans are fast. > >I'm curious: what is the "unrotated" or "old-fashioned" way. > >Cheers, > >Jon > > I mean no rotated bitboards, only one single square-bit mapping rather than 4. It means that you don't get all your bits next to each other when you calculate the attack maps for sliding pieces. That means you need a different way to generate these attack maps. It can be done quite efficiently using logical operations (AND, OR, XOR) and a table lookup as long as you have fast findfirstbit() and findlastbit() operations. That is where the PII and the PPro score over the older Pentiums and the 486's. All these machines have bit scan forward and bit scan reverse instructions, but the instructions only execute efficiently on the PII and PPro - they have a very fast timing of 1/2 clocks on these newer machines. Because of these fast bit scans, my code to generate attacks from a single rank-aligned bitboard system is faster than my rotated bitboard code to do the same thing, by more than 25%. However, if I ran the same test on an older machine, I think it is safe to predict that the rotated bitboards should run at about the same speed, but the method with the bit scans would be *much* slower, so you get a design decision where the most efficient method depends on the hardware. I suppose the best thing would be to have two versions that could be used for different platforms, but that would be rather messy to do I would think. Hope this explains what i mean OK. Best wishes, Roberto > >Of course, it's a big decision, as it affects all sorts of >>program design decisions, but if you want to maximise the power of the PII/PPro >>box, bit scans are the key strength to tap. >> >>Hope some of this is of use to you. Good luck with Grim Reaper. >> >>Roberto
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.