[rucksack-cvs] CVS rucksack/tests

alemmens alemmens at common-lisp.net
Mon Feb 11 12:47:53 UTC 2008


Update of /project/rucksack/cvsroot/rucksack/tests
In directory clnet:/tmp/cvs-serv22665/tests

Modified Files:
	test.lisp 
Log Message:
Version 0.1.16: improved performance by decreasing persistent consing for btrees
and using a lazy-cache.  Fixed some small bugs.  Added a few handy functions and
macros.

In detail:

Added P-PUSH and P-POP.

Improved btree efficiency by switching to a different data structure
for the bindings.  Instead of using a persistent cons for each key/
value pair, we now put the keys and values directly into the bnode
vector.  This speeds up most btree operations because it reduces
persistent consing when adding new values and it reduces indirections
when searching for keys.

Renamed BTREE-NODE to BNODE, BTREE-NODE-INDEX to BNODE-BINDINGS,
BTREE-NODE-INDEX-COUNT to BNODE-NR-BINDINGS, FIND-BINDING-IN-NODE to
FIND-KEY-IN-NODE.

Fix a missing argument bug in REMOVE-CLASS-INDEX.

Added a LAZY-CACHE which just clears the entire hash table whenever
the cache gets full.  This improves memory usage, because the normal
cache queue kept track of a lot of objects that for some reason
couldn't be cleaned up by the implementation's garbage collector.

Added the convenience macros RUCKSACK-DO-CLASS and RUCKSACK-DO-SLOT.

Made RUCKSACK-DELETE-OBJECT an exported symbol of the RUCKSACK
package.

Fix a bug in TEST-NON-UNIQUE-BTREE: it should call
CHECK-NON-UNIQUE-CONTENTS instead of CHECK-CONTENTS.

--- /project/rucksack/cvsroot/rucksack/tests/test.lisp	2008/01/23 15:49:07	1.1
+++ /project/rucksack/cvsroot/rucksack/tests/test.lisp	2008/02/11 12:47:53	1.2
@@ -1,4 +1,4 @@
-;; $Id: test.lisp,v 1.1 2008/01/23 15:49:07 alemmens Exp $
+;; $Id: test.lisp,v 1.2 2008/02/11 12:47:53 alemmens Exp $
 
 (in-package :rucksack-test)
 
@@ -363,7 +363,7 @@
             (check-order btree)
             (check-size btree (- n delete))
             (when check-contents
-              (check-contents btree))
+              (check-non-unique-contents btree))
             (format t "~&Reinserting~%")
             (shuffle array)
             (dotimes (i (floor delete nr-formats))
@@ -377,7 +377,7 @@
             (check-order btree)
             (check-size btree n)
             (when check-contents
-              (check-contents btree)))))))
+              (check-non-unique-contents btree)))))))
   :ok)
 
 (defun btree-stress-test (&key (n 1000))




More information about the rucksack-cvs mailing list