Re: Data Structure for use vs storage

"Marco Antoniotti (as marco dot antoniotti at unimib dot it)" <[email protected]>
Newsgroups gmane.lisp.lispworks.general
Message-ID <CAG0Nw2=gT2D3Znuq+Cdn_PV5RhJrO3vmqbfrxsabVoS+hnkakg@mail.gmail.com>
B-trees (et similia) make a lot of sense when you are dealing with disks
and blocks (and cylinders, and tracks).  If your data can stay in memory,
you can use any dictionary adt you like.

Besides, if you go the relational db route, the system will most likely
implement B-trees for you.

MA

Marco Antoniotti
https://dcb.disco.unimib.it


On Tue, 17 Feb 2026 at 18:19, David McClain (as dbm at refined-audiometrics
dot com) <[email protected]> wrote:

> I looked at the BTree code. Interesting. But when would you use this over
> the built-in Hashtables of Common Lisp? In fact, with Hashtables, you don’t
> even need an ordering to the underlying data, just an equality comparison.
>
>
>
> > On Feb 17, 2026, at 09:12, Dmitry Ivanov (as ystok-systema at mail dot
> ru) <[email protected]> wrote:
> >
> > wojciech.pasieka (as wojciech dot pasieka at ai dot pressiton dot com)
> wrote:
> >
> >> 1) Instead of SQLITE you can also try B-TREES in Lisp (SQLITE is
> basically B-TREES).
> >> A zero dependency one file solution
> https://github.com/ebobby/cl-bplustree:
> >>
> >> (defparameter *my-tree* (bplustree-new 4 :key (lambda (r)
> (parse-integer r))))
> >
> > Thanks for the reference.
> >
> > That would be more valuable if the code was thread-safe and rewritten
> using LispWorks MP facilities, e.g.
> >
> > (sys:defvar-global *my-tree*
> >       (bplustree-new 4 :key (lambda (r) (parse-integer r))))
> >
> > --
> > Dmitry Ivanov
> > lisp.ystok.ru
> >
> > _______________________________________________
> > Lisp Hug - the mailing list for LispWorks users
> > [email protected]
> > http://www.lispworks.com/support/lisp-hug.html
>
>
> _______________________________________________
> Lisp Hug - the mailing list for LispWorks users
> [email protected]
> http://www.lispworks.com/support/lisp-hug.html
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.