Arc Forumnew | comments | leaders | submitlogin
2 points by Pauan 4304 days ago | link | parent

My mistake, I said B-tree when I meant "binary tree"[1]. It has been corrected.

AVL is a particular kind of self-balancing binary search tree[2], which is what I want. Which kind of tree isn't so important, just so long as it's simple and fast enough.

---

* [1]: B-trees are a self-balancing n-ary search tree, and judging by the Wikipedia article, I probably won't use them in Nulan, at least not for a while.

* [2]: Not every binary tree is a search tree, and not every search tree is self-balancing.

I want all three properties because of the good worst-case performance and because I believe that it will be easier to parallelize if the trees are roughly balanced.

As for why I chose binary over n-ary, that's simply for the sake of simplicity. Since it'll be a core datatype, I don't want the programmer API being too complicated.