3 ms·
I'm working on a similar prolly implementation, but for Javascript. I just used the JS splice() contract for the main API abstraction. It maps perfectly onto p
by conartist6 1mo ago
I'm working on a similar prolly implementation, but for Javascript.
I just used the JS splice() contract for the main API abstraction. It maps perfectly onto prolly trees since it already allows bulk insertion and deletion: https://github.com/bablr-lang/agast-helpers/blob/7225f30e5e5075199c806b001e1e329eb655027d/lib/tags.js#L720 https://github.com/bablr-lang/agast-helpers/blob/7225f30e5e5...
Prolly trees have some funky properties too, for example deleting a value from a prolly tree can cause it to end up having more nodes than it started with..!! (So too can inserting a value result in fewer tree nodes)
- conartist6 1mo agoActually the insertion and deletion quirk may just be my trees because I do the probabilistic splitting between values rather than on them as usual
- deleted 1mo ago[deleted]
- whizzter 1mo agoDolt had an interesting article on the subject, basically to get it more reliable in terms of similar size distribution they basically had a split threshhold function that shrunk by the current size, i did a bit of experimentation with statistics collection on a similar splitter and it was a bit of fiddling to get right in terms of how it should behave but it seemed to be possible to tune to specific block sizes.
- conartist6 1mo agoYeah I've read that article many times. I don't have such a mechanism at the moment. I'm not sure if I will until I run some of my own experiments. I also have much smaller nodes than Dolt generally, and where they only hash keys to balance the tree, I also allow the value to influence the tree structure.