const A = randn(100);
aa = AxisArray(A;x=SortedVector([i for i in 1:100]));
function axisarrays_alloc(array,xs)
@view array[xs];
nothing;
end
xs = 2:10;
@benchmark axisarrays_alloc(aa,xs)
This occurs if x is a SortedVector or plain Vector but not if it is a range. I believe this is related to #147 since the axes are being copied even in a view. I have not yet verified whether or not it is fixed by #148.
Consider the following simple example:
results in:
This occurs if
x
is aSortedVector
or plainVector
but not if it is a range. I believe this is related to #147 since the axes are being copied even in a view. I have not yet verified whether or not it is fixed by #148.