JuliaLang/julia — pull request #3224 by timholy (2013-05-28 10:30:06+00:00)
Title: RFC: add SubVector (fast 1d slices)

Here's a baby step towards making Arrays just pointers + size & stride information. With it I'm getting ~2x - 2.5x speedups over `mapslices` in a recent application that looks a lot like this:

notd = setdiff([1:nd], d)
indexes[d] = 1:size(A, d)
for c in Counter(szA[notd])
indexes[notd] = c
s = SubVector(Aout, indexes...)
filt!(b, a, s)
end

`Counter` comes from `Grid.jl`.