3 ms·
>In any case, there's a lot of tree flavors. Lisp is certainly sufficient and simple when it's exploring these different details. I've become a fan of scapegoa
by shawn_w 1y ago
>In any case, there's a lot of tree flavors. Lisp is certainly sufficient and simple when it's exploring these different details.
I've become a fan of scapegoat trees¹ lately for (immutable) balanced trees. There are certainly a ton of other options besides RB and AVL trees that are fun to explore (in any language)
>I've heard of highly optimized lisps where the typical list is turned into an array...
Back in the lisp machine days there was CDR coding² to flatten out a list into a contiguous block, but I'm not sure if any modern common lisp or scheme implementations use it.
[1]: https://en.wikipedia.org/wiki/Scapegoat_tree https://en.wikipedia.org/wiki/Scapegoat_tree
[2]: https://en.wikipedia.org/wiki/CDR_coding https://en.wikipedia.org/wiki/CDR_coding