Author: Robert Hyatt
Date: 08:13:17 11/13/04
Go up one level in this thread
On November 12, 2004 at 09:18:09, Peter Fendrich wrote:
>Will C++ compilers (especially .NET) handle bit fields with decent performance?
>It is very tempting to use them in hash tables for instance.
>Something like this:
>
>struct Hash
>{
> unsigned KeyPart : 48; // 32+16
> unsigned Eval : 16;
> unsigned Flag : 2; // FH, FL, Inside
> unsigned FrPiece : 4; // Move
> unsigned Fr : 6; // Move
> unsigned To : 6; // Move
> unsigned Threat : 1;
> unsigned Depth : 10;
> unsigned Generation : 3;
>} hash;
>
>hash.KeyPart = HashKey;
>etc...
>
>/Peter
Forget it. You notice I don't use 'em in Crafty? I did early on. I think
comments in main.c explain why.
I don't know why compilers were so bad doing this when I tried it, but they
really were bad. And I'm not talking just about gcc.
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.