[computer-go] Fast inner loops in Go

Anders Kierulf anders at smartgo.com
Fri Sep 1 16:01:41 PDT 2006


>> Linked lists of neighbors of each color make the inner loops fast, but
>> I suspect you're paying a higher price when adding or removing stones,
>> as removing a point from a linked list usually involves a loop.
>>
>> Anders

> Removing points or stones from a list should not involve
> any loops, whether the list is an array or a linked list.
> It should be fixed time.
>
> Mark

I should have expressed myself more precisely. The actual removal can be
done in fixed time, but only after you know where in the list the point is.
So you need a loop to find the point in the list first.

If you have a way to update linked lists of neighbors in fixed time, please
show us how. :-)

Anders Kierulf
www.smartgo.com



More information about the computer-go mailing list