https://issues.dlang.org/show_bug.cgi?id=8405

--- Comment #3 from [email protected] ---
(In reply to Peter Alexander from comment #1)
> How do you make opIndex O(1) for a joiner range? Surely you have to count up
> the lengths of all the sub ranges until you hit the desired index? That's
> O(n).

In the common use case I've shown, where you have an array of array, all array
lengths are known. If joiner caches internally the lengths of all the rows, the
successive accesses are O(1). This requires some heap memory...

--

Reply via email to