gnugo-devel
[Top][All Lists]
Advanced

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

Re: [gnugo-devel] engine/influence.c


From: Dave Denholm
Subject: Re: [gnugo-devel] engine/influence.c
Date: 23 Sep 2002 11:11:27 +0100

Arend Bayer <address@hidden> writes:

> A couple of things regarding the loop unrolling bug:
> 
> Dave wrote:
> 
> > Arend Bayer <address@hidden> writes:
> >
> > > On 6 Sep 2002, Dave Denholm wrote:
> > > > <address@hidden> writes:
> > > > > Here are the test results after defining
> > > > > #define EXPLICIT_LOOP_UNROLLING 0
> > > > > in influence.c. Test results are current, so the unexpected results 
> > > > > are
> > > > > ALL due to this change.
> I went through those unexpected results, and I do think the behaviour
> w/ the fix is better than without.
> 
> > > * unfortunately, a big slowdown:
> > > Running on safety.tst (which contains only early game positions):
> > >
> > > Profile of cvs:
> > >  time   seconds   seconds    calls  ms/call  ms/call  name
> > >  10.57      7.82     7.82    21833     0.36     0.36  accumulate_influence
> > >
> > > Profile with this change:
> > >  22.31     17.24    17.24    23074     0.75     0.75  accumulate_influence
> > >
> > > In other words, we should do s.th. about the performance.
> >

> I've applied the patch by hand to CVS -- I had to remove the hard-coding
> of DIAGONAL_DAMPING and also added one other micro-speedup (now we test
> first whether the permeability is 0.0 before we even start the inner
> loop). It's a good improvement over the simple bugfix, but still
> a lot worse than CVS:
> 
>  time   seconds   seconds    calls  ms/call  ms/call  name
>  17.03     13.64    13.64    24374     0.56     0.56 accumulate_influence
> 
> In my opinion 10% is already too much time for this function.
> 


Is this with unrolling on or off ?

It had been my intention that adding both the do ... while(0) around the
macro and changing the order of the invocations of the macro should make
the two cases identical. So it should no longer be necessary to turn off
loop unrolling.

And then getting rid of the divisions was an additional speedup.


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




reply via email to

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