Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: attacks_from[] and attacks_to[] info

Author: Gerd Isenberg

Date: 15:47:54 10/22/02

Go up one level in this thread


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



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.