[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gnugo-devel] fastlib optimization
From: |
Evan Berggren Daniel |
Subject: |
Re: [gnugo-devel] fastlib optimization |
Date: |
Sun, 20 Oct 2002 22:12:30 -0400 (EDT) |
On Sat, 19 Oct 2002, Trevor Morris wrote:
> I think that Paul's optimization is correct, and should cover even
> more cases. I've been fooled before, though. This message
> contains the relevant part of Paul's patch:
Agreed.
The following addition covers another case:
?O?
OXO
OXO
.*.
.O.
?.?
It is on top of Paul's patch. I have not checked the speed improvement.
It's probably fairly irrelevant, actually. But I coded it to see, so why
not send it in...
Evan Daniel
diff -u engine/board.c engine/board.c
--- engine/board.c 20 Oct 2002 17:35:37 -0000
+++ engine/board.c 21 Oct 2002 02:01:43 -0000
@@ -2082,7 +2082,9 @@
&& COUNTSTONES(ally1) == 1)) {
#else
if (neighbor_size == 1
- || (neighbor_size == 2 && !ally1)) {
+ || (neighbor_size == 2 && !ally1)
+ || (neighbor_size == 2 && COUNTSTONES(ally1) == 1 &&
+ !neighbor_of_string(ally1, neighbor))) {
#endif
/* Here, we can gain only the adjacent new liberty. */
fast_liberties++;