gnugo-devel
[Top][All Lists]
Advanced

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

Re: [gnugo-devel] engine/influence.c (and DFA)


From: Dave Denholm
Subject: Re: [gnugo-devel] engine/influence.c (and DFA)
Date: 03 Sep 2002 17:25:24 +0100

Dave Denholm <address@hidden> writes:

> Arend Bayer <address@hidden> writes:
> 
> > On 3 Sep 2002, Dave Denholm wrote:
> > 
> > > Hi,
> > >    I was just having a look at influence.c, since that is where the
> > > profile shows the most time being spent.
> > >
> 
> I noticed that the unrolled version doesn't visit the neighbours in
> exactly the same order. Changing this also does give exactly the
> same game whether the loop is unrolled or not. Unrolling the loop
> reduced the time from 6 minutes to 5 minutes 37 seconds. (I had been
> wondering whether the measured speedup had been due to it doing less
> work, rather than due to the unrolling.)


Pulling out some loop invariants, and changing divisions to multiplications
gets it down to 5m 14s



> > - There are many bi-dimensional arrays. Would it make sense to replace 
> > them by pointers to pointers? Two indirections are supposed to be faster 
> > than the arithmetic needed to access elements in a bi-directional array. 
> > The syntax to read an element is the same, but some initialization code 
> > is needed.
> > 
> 
> Depends - if row size is a power of two, may be able to perform
> the indexing as a single instruction. ARM certainly can.
> 
> Again there are cache effects - accessing memory could be slower
> than the calculation if it causes a cache miss.

And of course latest pentiums are super-scalar, and can possibly
be performing the scaling in parallel with other instructions,
provided it doesn't stall needing the result.


dd
-- 
address@hidden          http://www.insignia.com




reply via email to

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