Open treeowl opened 4 years ago
@sjakobi, would you be interested in giving this a go? My best guess:
Size
stuff from Array
to its own module.DataKinds
to plain old-school style, so we can add as many base types as we want to supplement Mul1
.I'm likely to do some cleanups to make this all easier in the next few days. We also really need a benchmark suite first.
@sjakobi, would you be interested in giving this a go?
Unfortunately, I'm unlikely to find time for this.
I realized something yesterday. We can actually cram a full O(log n)
elements into the 0th node if we want, and I imagine we might!
Dealing with arrays of 1, 2, or even 4 elements has a proportionally unreasonable amount of overhead. We really should build something simpler above the main mechanism to streamline the top of the structure. That could look like
or maybe even represent the front and rear as linked lists with their (bounded) sizes. Benchmarking will determine what works best.
The tricky part is the stupid part: arrange for the first level of the main mechanism to have an arbitrary positive array size. This will require some fiddling with how we type-tag arrays for size.