1709aec95b
This implements a common B-tree using rbyd's as inner nodes. Since our rbyds actually map to sorted arrays, this fits together quite well. The main caveat/concern is that we can't rely on strict knowledge on the on-disk size of these things. This first shows up with B-tree insertion, we can't split in preparation to insert as we descend down the tree. Normally, this means our B-tree would require recursion in order to keep track of each parent as we descend down our tree. However, we can avoid this by not storing our parent, but by looking it up again on each step of the splitting operation. This brute-force-ish approach makes our algorithm tail-recursive, so bounded RAM, but raises our runtime from O(logB(n)) to O(logB(n)^2) That being said, O(logB(n)^2) is still sublinear, and, thanks to B-tree's extremely high branching factor, may be insignificant.