behavior of slice
- Posted by SDPringle Jun 24, 2014
- 1548 views
jimcbrown said...
I don't think we make a full shallow copy of a sequence (let alone a deep one) when we make a slice, so I doubt we'd see any performance issues here because of just this.
I would be very surprised if this was not the case. A result of a slice operation has a distinct length, if the base pointer points inside of another sequence's base pointer's members we are not protected by ref counting scheme employed by EUPHORIA. There must be a shallow copy of the members of the passed sequence in a slice. We must create a new sequence when ever we do a slice operation.
Shawn