Computer Chess Club Archives


Search

Terms

Messages

Subject: Bitfields and Crafty

Author: Artem Pyatakov

Date: 19:56:44 07/11/01


I was checking out the way crafty does hashing today. (yes, I've probably looked
at the way every single open-source engine does hashing today :-) )

I noticed that each of it's HASH_ENTRY structures information is just two 64-bit
numbers.  Then in extracts this info using statements like these:

val=(word1r & 0377777)-65536;

I know C allows for bitfields (fields that just take up a couple of bits), but
does anyone know how fast these are?

In other words, is it better to extract info from bits MYSELF (like Crafty does
it) or let C bitfields handle this for me?

Thanks.

Artem Pyatakov



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.