gnugo-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gnugo-devel] DFA rewrite


From: Evan Berggren Daniel
Subject: Re: [gnugo-devel] DFA rewrite
Date: Tue, 3 Sep 2002 09:46:36 -0400 (EDT)

On Tue, 3 Sep 2002, Tanguy URVOY wrote:

> Evan Berggren Daniel wrote:
> > 16 *bytes*.
>
> Sorry my mistake :(
>
>
>
> 4 32 bit integers, 32 bit index.  Index of each state is done
> > positionally, of course.  Ie, it's not actually stored in the table, just
> > the indexes of the new states.  Actually, now that I think about it, maybe
> > we should index on bytes and not state numbers...  avoid a multiply to get
> > the address of the new state.
>
>
> I did some experiment about adress indexation to save an addition.
> The result was a complicated table for exactly the same
> performance :(
>
> The relative indexation may save some memory,
> but it is harder to maintain.
> With a 32 bit index it is more simple to keep absolute
> indexes, a 4 Gb automaton is big enough for the moment :)

Relative indexing seems a mess to me.  I was just thinking about writing
the code as an array of bytes, ie valid indexes are all multiples of 16,
instead of as an array of structs.  Absolute indexes are clearly the way
to go, at least if you have an intelligent compiler (and if we don't, I
know I can do better), because you're just an indirected load away from
your next state.  And if we start running into 4 GB things, then I somehow
think downloads are a larger problem...

Thanks

Evan Daniel





reply via email to

[Prev in Thread] Current Thread [Next in Thread]