gnugo-devel
[Top][All Lists]
Advanced

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

Re: [gnugo-devel] semeai_3_15.1a


From: Gunnar Farneback
Subject: Re: [gnugo-devel] semeai_3_15.1a
Date: Sat, 11 Jan 2003 14:53:42 +0100
User-agent: EMH/1.14.1 SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.3 Emacs/20.7 (sparc-sun-solaris2.7) (with unibyte mode)

Arend wrote:
> Dan wrote:
> > Gunnar wrote:
> > > Why remove this? I think it's a big win not having to test whether
> > > move is NULL, like this,
> > >
> > > > -      *move = PASS_MOVE;
> > > > +      if (move) *move = PASS_MOVE;
> > >
> > > some 15 times in the function.
> >
> > I didn't change this. I don't see why this is a big win. One way you

Maybe not a big win but at least a clear win.

> > test (move) being a null pointer, the other way you set a dummy
> > variable only to discard the result. In any case, it's misleading to
> > point out that this happens 15 times in the function since this will
> > probably happen only once per call to do_owl_analyze_semeai.
> 
> But Gunnar's point was that you have this code 15 times in the function,
> making the code even longer to read than it already is. (Of course
> do_owl_analyze_semeai is approximately not performance relevant at all.)

Exactly. This is a question of readability. Performance is not an
issue here. By setting up the dummy variable the rest of the code
becomes easier to read and considering the complexity of the semeai
code, anything that simplifies it is welcome, even if it's only a
small contribution.

/Gunnar




reply via email to

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