Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: To compress hashtable size?

Author: Miguel A. Ballicora

Date: 08:54:17 07/14/01

Go up one level in this thread


On July 14, 2001 at 10:29:38, Heiner Marxen wrote:

>On July 14, 2001 at 01:59:31, TEERAPONG TOVIRAT wrote:
>
>>Hi,
>>
>>I've been trying to reduce my hashtable size,so that I can gain
>>more entries. At first,I try to pack three structure tag into one
>>integer it looks like this...
>>
>>  new integer = (flag<<a)|(depth<<b)|(value)
>>
>>It fails because value is signed int the rest are unsigned.
>>Could anyone solve the problem?
>>
>>Thanks in advance,
>>Teerapong
>
>You could make value the highest part of the new integer, instead of
>the lowest.  Then extaction via >> should preserve the sign as long as
>the value fits into the new integer.

This is a cool idea! however, the extraction with >> is not guaranteed to
be correct by the ANSI standard. It is implementation defined.
Anyway, I believe that will be correct most of the time but I think is
kind of risky.

Regards,
Miguel



>
>Heiner



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.