Author: Dominic C. Marcello
Date: 11:35:53 09/19/01
Go up one level in this thread
On September 19, 2001 at 09:59:58, Robert Hyatt wrote: >On September 19, 2001 at 06:30:56, Dominic C. Marcello wrote: > >> As far as the penalty for using 64 bit bitboards on a 32 bit machine, with >>intel's mmx registers on the Pent pro and later, the penalty can almost >>disappear with a little inline assembly. Some instructions are not avallable for >>use with the mmx registers though. For instand, bsr and bsf ( bit scan reverse >>and forward) have no mmx instruction equivalent, but there is an mmx equivalent >>for and, nand, or, xor (but not not), as well as left and right shifts. It's a >>lot faster than treating the bitboard as two seperate double words, and if intel >>would just add a bit scanning function to it, bitboards could be operated on >>exclusively in the mmx registers. >>There's also some newer instructions on the pent IV, one of which would allow >>you to extract an 8 bit rank from a 64 byte board. > >The problem with MMX is that compilers are not supporting it to work on long >long (or __int64) data types. This means we have to resort to assembly. And >that lengthens the development cycle significantly. I've found most of the extra work in terms of assembly to be pretty small compared to the benefits. If you're compiler supports inline functions in C and inline assembly (I use MSVC++, and I specifiy __forceinline), it's really pretty easy to implement. The inline inline assembly functions only have to do a few really simple things. Like And( sint64 b, sint64 bb ) just ands the two bitboards, the function for this is simply __forceinline( sint64 b1, sint64 b2 ) { sint64 ret;
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.