gnugo-devel
[Top][All Lists]
Advanced

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

RE: [gnugo-devel] Persistent connection cache.


From: Portela Fernand
Subject: RE: [gnugo-devel] Persistent connection cache.
Date: Fri, 7 Feb 2003 15:35:05 +0100

Gunnar wrote:

> This patch implements a persistent connection cache. Unfortunately it
> doesn't do much good. The saving of connection and reading nodes seems
> to be so small (in the order of 1% to 2% over a whole game) that it's
> unclear whether it offsets the caching overhead. Possible explanations
> for this include:
> 1. The active area is too often unnecessarily large.
> 2. Between the persistent caches of tactical reading and owl
>    reading, there is not much to gain from also caching the
>    connection results.
> 3. There is some bug in the implementation.

Possibly, there are currently many patterns using attack_either and/or
defend_both as a mean for detecting cuts and or connections. I wonder if it
wouldn't be interesting to improve their efficiency by replacing the
constraints with connect/disconnect ones. This could reduce reading nodes
while not increasing too much the connection nodes thanks to the persistent
cache.

Btw, a small cosmetic patch is appended. In case someone wants to try 
increasing the size of the connection cache (as I did), it will save him 20
seconds bug hunting.

/nando

- copy/pasto fixed

Index: engine/persistent.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/engine/persistent.c,v
retrieving revision 1.9
diff -u -r1.9 persistent.c
--- engine/persistent.c 26 Jan 2003 10:30:08 -0000      1.9
+++ engine/persistent.c 7 Feb 2003 14:38:18 -0000
@@ -108,7 +108,7 @@
 };
 
 static struct connection_cache
-persistent_connection_cache[MAX_READING_CACHE_SIZE];
+persistent_connection_cache[MAX_CONNECTION_CACHE_SIZE];
 static int persistent_connection_cache_size = 0;
 
 




reply via email to

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