Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: TB Probes

Author: Eugene Nalimov

Date: 23:13:33 11/13/99

Go up one level in this thread


There are 2 easy ways to get rid of MOD operation:

(1) Division by a constant can easily be replaced by a multiplication by another
constant; and multiplication, still relatively expensive, is nevertheless
reasonable enough - i.e. it will cost you not 100 CPU ticks, but something like
10.

(2) You can use small array[256][5].

Eugene

On November 14, 1999 at 01:16:42, Bruce Moreland wrote:

>On November 13, 1999 at 06:37:20, Angrim wrote:
>
>>2 bits per position is still more than you need since there are only 3
>>values possible.  Useing base 3 you can store 5 entries per byte instead
>>of just 4, saveing 20% on memory.  This can be probed just as fast as the
>>2 bits per entry method since you can still directly calculate which byte
>>of the table contains each entry.
>>To extract entry N read byte index N/5 and extract the
>>(N mod 5)+1st trinary digit from this byte.
>>Where the first digit is N mod 3, the second is (N/3) mod 3, third is
>>(N/9) mod 3, etc.
>
>The "mod" operator is satanic but there is probably a way around this.
>
>Something people should realize is that a lot of these programs probably don't
>have a single multiply or divide instruction in them.  Mine has one.
>
>bruce



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.