Author: Severi Salminen
Date: 01:36:17 01/15/02
Go up one level in this thread
>>I think something like this should work: >> >> bsr eax dword ptr bitboard >> sub eax 32 >> bsr eax dword ptr bitboard+4 >> add eax 32 >> >>which makes using last-bit a bit more expensive, but it's still >>straight line code... >> >>-Dan. > >Oh yeah, of course. I can't see why I didn't see that myself... The same here too, the more you try to think things, the dumber you'll get :( The above is of course the fastest version. But how expensive is bsr/bsf?? Is it allways the same or does it take more cycles if the first 1-bit is farther away? This will make a big impact and a version with jmp might be faster. Severi
This page took 0.01 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.