Re: Data Structure for use vs storage
"David McClain (as dbm at refined-audiometrics dot com)" <[email protected]>
| Newsgroups | gmane.lisp.lispworks.general |
|---|---|
| Message-ID | <[email protected]> |
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