[Top][All Lists]

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

Re: [gnugo-devel] DFA space savings

From: Trevor Morris
Subject: Re: [gnugo-devel] DFA space savings
Date: Thu, 07 Nov 2002 12:18:14 -0500

>The runtime structure probably doesn't need maxStates, lastState, 
>Or at least, I didn't bother to have them in the version I was playing with.
Good point.

>Probably worth making the state and index arrays const - no effect on 
>size, but core files will be smaller since (I assume) system won't write
>const data into core file.
Yes, I remember you mentioning that before. Good idea.

>Out of interest, did you measure speed and space-saving by just making next[] 
>an array
>of short rather than array of int ?
My real goal is to try to use incremental offsets and cram each next into a 
single unsigned char.

>Is it really both faster and smaller to store two char's and combine them, 
>than using one short ?
Certainly smaller.
No slower, according to 2 complete regression runs overnight, but not faster,
despite what the comments in the text currently read.  Some owl tests I
did early looked to be slightly faster.  The compiler may be able to be quite
clever here.

>> No speed difference, but the size improvement is probably worth putting
>> the patch in anyway.  I believe by using unsigned chars that it will be
>> platform independent.  The patch is also a good step towards making other 
>> DFA 
>> optimization experiments easier.
>> Hm... I just noticed that I left in the "__inline", which works fine under 
>> both
>> VC and Cygwin.  Has anyone who groks configure looked into creating a
>> GG_INLINE?  In case I haven't voted, I think it's a good idea.

reply via email to

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