gnugo-devel
[Top][All Lists]
Advanced

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

RE: [gnugo-devel] micro-optimization


From: Portela Fernand
Subject: RE: [gnugo-devel] micro-optimization
Date: Mon, 13 Jan 2003 22:00:19 +0100

Gunnar wrote:

> I don't know why the shift operation is used here but I can only
> assume it's intended to be some kind of optimization.

Not quite. I know very well this isn't needed and is actually bad style in
this context. It's just that I've been writing a lot of code this way
because of my past coding experiences. With the years, bit-shifting has
become in a large measure more natural to me than dividing. So this was
just a bad habit, based on the wrong assumption that the readers of this
code have the same automatisms as me.

Another possible reason of my being careless here, is that this policy
(dividing by 2 if weakly surrounded) is clearly too simplistic, and I wanted
to revise it in the near future.

Anyway, good point Gunnar, thanks for reviewing / correcting (much
appreciated) and sorry for this, I'll try to pay more attention next time.

/nando




reply via email to

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