[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gnugo-devel] paul_3_13.6
From: |
Dave Denholm |
Subject: |
Re: [gnugo-devel] paul_3_13.6 |
Date: |
09 Dec 2002 22:19:31 +0000 |
Paul Pogonyshev <address@hidden> writes:
> this patch fixes tree-based pattern matcher and speeds the
> matching up a bit.
>
> - tree-based pattern matcher fixed
> - pattern matchers sped up
>
> here is the full list of speedups:
>
> - the order of indices in transformation[][] and spiral[][]
> arays swapped. improves caching.
I'm confused...
>
> /* go to next state */
> - delta = pdfa->states[state].next[dfa_p[dfa_pos + spiral[l][row]]];
> + delta = pdfa->states[state].next[dfa_p[dfa_pos + spiral[row][l]]];
> state += delta;
> row++;
> } while (delta != 0); /* while not on error state */
>
I see the inner loop being over row, not 'l'. So swapping the
indices hurts the cache, rather than helping it ?
If there are enough registers, compiler should be able to put
spiral[row] into a register.
x86 can scale memory accesses by small powers of 2, but 8*sizeof(int)
is probably too big.
Or am I being particularly dense ?
dd
--
address@hidden http://www.insignia.com