Ideally when working from an IndexedSeqView over an ArraySeq, there should be only one array copy (or at least only one new array allocated) when converting the view back to an ArraySeq after some manipulation.
What is the most performant way to get back to an ArraySeq?
A couple options that come to mind:
ArraySeq.unsafeWrapArray(view.toArray)
seems promising, but does .toArray know the view is over an array and can use fast array copies to populate the new array?
ArraySeq.from(view)
I'm guessing this is O(n)
The standard way would be