[elephant-devel] using btrees or not using btrees
Aycan iRiCAN
aycan.irican at core.gen.tr
Wed Apr 19 19:47:09 UTC 2006
Hi,
What is the difference between 'using a btree for items' and 'using an
object to hold items'?
Say we have a node class. In the first method, I'm creating objects
and adding them to a btree.
(add-to-root 'nodes (make-indexed-btree))
(dolist (item (create-100-node))
(setf (get-value 'key 'nodes) item))
Now I can use cursors and indexes to reach nodes. In the second
method, I'm using an objects slot to hold nodes.
(add-to-root 'nodes (make-instance 'node-container :nodes '()))
(dolist (item (create-100-node))
(push item (nodes (get-from-root 'nodes))))
Because of ease of use and maintainability, we're thinking that the
second method is better than the first method. We can get a backup
with a single cl-store call, we can easily walk the structure
etc.
Any ideas?
Best Regards.
--
Aycan iRiCAN
C0R3 Computer Security Group
http://www.core.gen.tr
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/elephant-devel/attachments/20060419/141427fa/attachment.sig>
More information about the elephant-devel
mailing list