Author: Gerd Isenberg
Date: 12:40:33 08/07/03
Go up one level in this thread
On August 07, 2003 at 08:24:28, Sune Fischer wrote: >On August 07, 2003 at 08:15:08, Uri Blass wrote: > >>>Crafty is 64 bit prog, which means it's slow on 32 bit, even I have found that >>>doing a lookup is faster than shifting, I simply never do 1<<sq, I use a table >>>for that. >> >>I guess that it is only for 64 bits and if you have 32 bits number then it is >>better to do 1<<i when 0<=i<32 and not to use arrays. >> >>Correct? > >If you can do the shift in 1 clock, then you can't go any faster, but 64 bit >shifts are slow on old 32 bit chips so the table becomes faster. > >So for pure 64 bit you get fewer tables, faster and cleaner code. > >-S. > Hi Sune, Exactly! On the other hand, i believe that there is no need to use 64 bits everywhere, if 32 bits are enough. Using the standard six 32-bit register set is still fine with Opteron and one byte shorter opcode due to missing REX prefix. I don't know sizeof(int) in AMD64 compilers, still 4, or 8 per default. But of course there are explicite 32- or 64-bit types, signed as well as unsigned. I'm strained about what is the fastest 64-bitscan on opteron, specially if two scans should be done simultaneously e.g. to get a move from/to index: 1. Matt Taylor's 64-bit mul with de Bruijn sequence. 2. Folded 32-bit mul with Matt's super magic de Bruijn sequence. 3. bsf, still vector path and 9 cycles. But i have to wait some time, until i can try it ;-( Cheers, Gerd >>Uri
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.