The fact is, matrices and vectors **already** contain a seq, which is allocated 
on the heap (at least in the common case), so there is not much more cost in 
adding an additional ref.

The only case where avoiding a ref would actually save time is when many 
matrices or vectors refer to the same underlying seq, but point at different 
places. A common case is iterating over the rows or columns of a matrix.

I have decided to just optimize this case for now, by reusing the same ref, and 
therefore avoiding allocations (well, there is just a single allocation for the 
whole iteration)

Reply via email to