Computer Chess Club Archives


Search

Terms

Messages

Subject: Bob & Eugene: PopCnt64()

Author: Bas Hamstra

Date: 11:31:27 04/25/01


inline int PopCnt(BB M)
{   unsigned char *p = (unsigned char*) &M;
    return PopCnt8[p[0]]+PopCnt8[p[1]]+PopCnt8[p[2]]+PopCnt8[p[3]]
           +PopCnt8[p[4]]+PopCnt8[p[5]]+PopCnt8[p[6]]+PopCnt8[p[7]];
}

Last time I tested, on my Celeron the above PopCnt was way faster than Crafty's
asm version. Am I overlooking something? Maybe because my compiler refuses to
inline asm statements?


Bas.




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.