Author: Gerd Isenberg
Date: 06:45:01 10/23/02
Go up one level in this thread
On October 23, 2002 at 05:56:25, Sune Fischer wrote: >On October 22, 2002 at 18:55:09, Gerd Isenberg wrote: > >>On October 22, 2002 at 18:52:11, Gerd Isenberg wrote: >> >>>On October 22, 2002 at 18:47:54, Gerd Isenberg wrote: >>> >>>>one possible improvement :-) >>>> >>>>I would guess this reduces dependencies and may shlightly or microscopic faster: >>>> >>>>bitboard WhitePawnAttacks (bitboard b) >>>>{ >>>> bitboard c = b; >>>> b ^= b; // b ^= c has to wait for the previous instruction >>>> b |= (c << 7) & 0x7F7F7F7F7F7F7F7F; >>>> b |= (c << 9) & 0xFEFEFEFEFEFEFEFE; >>>> return b; >>>>} >>>> >>>>Gerd >>> >>>Or of course: >>> >>>bitboard WhitePawnAttacks (bitboard b) >>>{ >>> bitboard c = b; >>> b = (c << 7) & 0x7F7F7F7F7F7F7F7F; >>> b |= (c << 9) & 0xFEFEFEFEFEFEFEFE; >>> return b; >>>} >> >>what about this: >> >>bitboard WhitePawnAttacks (bitboard b) >>{ >> return ((b << 7) & 0x7F7F7F7F7F7F7F7F) >> |((b << 9) & 0xFEFEFEFEFEFEFEFE); >>} > >Isn't that what everyone is doing? ;) Hi Sune, yes, may be. My synapse latency was rather huge last night, so it took theses three steps, to see what is really the matter with this PawnAttack routines posted by Russell :) Regards, Gerd > >From Crafty: > pcapturesl=(WhitePawns & mask_left_edge)>>7 & target; > >I don't know why Crafty also has a pawn attack table, seems pretty redundant to >me, probably even a slowdown. > >-S.
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.