|
|
|
|
|
by xscott
1656 days ago
|
|
I didn't dive too far into your repo, but it looks like you're doing something similar to Finger Trees [0]. Finger Trees as described in [1] are configurable to be several different kinds of data structures, but using them as a simple list gives you: amortized O(1) insert, remove, update at head and tail
O(log n) insert, remove, update, worst case
O(log n) concatenation of two lists
And you can traverse all N elements forward or backwards in O(1) per element.I think it's a very nice data structure. [0] https://en.wikipedia.org/wiki/Finger_tree [1] https://www.staff.city.ac.uk/~ross/papers/FingerTree.pdf |
|
Conclusion: unusuably slow (which kind-of makes sense, since it looks like the common implementation is a 2-3 fingertree - compared to a branching factor of 32 for Vector).