Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Question:1.hashtable 2.board 3.C

Author: Tom Kerrigan

Date: 10:39:20 06/13/00

Go up one level in this thread


On June 13, 2000 at 12:18:34, TEERAPONG TOVIRAT wrote:

>Hi,
>
>I have 3 questions.
>1. Does two level transpositional table have significant
>advantages over one level table ? If so,how much we
>gain in % ?
>
>2.In board representation,besides bitboard ,which is faster
>between board 12x10(or 12x12) and board 0x88 ?
>To generate the move,after obtaining piece and location,
>the former takes one array look up and one arithmetic
>operation to get a valid square.On the other hand,the
>latter takes 2 times table look up(map and unmap)
>and one arithmetic and one bitwise operation(&0x88) .
>I think the former is better. Am I right ?

I think this is the code that you're talking about. First, for the 10x12 board:

n = a[b[n] + c];     // 1 add, 2 table lookups
if (n == -1)         // 1 subtract
  break;             // 1 branch

And here's the 0x88 code:

n += c;              // 1 add
if (n & 0x88)        // 1 logic
  break;             // 1 branch

So they're identical, except for the table lookups. The table lookups are what
kill you though. With today's processors, addition and logic operations are
basically instantaneous. So the 0x88 approach is much better.

-Tom



This page took 0.02 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.