Will do!

On Friday, March 27, 2015, Tim Holy <[email protected]> wrote:

> Thanks for chiming in, Matt.
>
> I should have added that there are _some_ SubArrays that do have efficient
> linear indexing: sub(A, :, 3:5) and sub(A, 2, :), for a matrix A, are two
> examples. (The latter in particular is one of the advantages of 0.4's
> SubArrays over ArrayViews.) But in general it's not efficient.
>
> But Sebastian, please do file those issues. It's hard to keep track of what
> needs updating, and issues are vastly preferable to posts to julia-users.
> For
> instance, it's already gone clean out of my head what function was slow
> with
> SubArrays :-).
>
> --Tim
>
> On Friday, March 27, 2015 10:58:40 AM you wrote:
> > Ah, excellent, that makes sense. In practice this is how we'll be doing
> it
> > anyway.
> >
> > On Friday, March 27, 2015, Matt Bauman <[email protected] <javascript:;>>
> wrote:
> > > On Friday, March 27, 2015 at 8:21:10 AM UTC-4, Sebastian Good wrote:
> > >> Forgive my ignorance, but what is Cartesian indexing?
> > >
> > > There are two ways to iterate over all elements of an array: Linear
> > > indexing and Cartesian indexing. For example, given a 2x3 matrix,
> linear
> > > indexing would use just one index from 1:6, whereas Cartesian indexing
> > > specifies indices for both dimensions: (1,1), (1,2), (2,1), ...
> > >
> > >
> > > If an array isn't stored continuously in memory for linear indexing,
> > > converting to the Cartesian indices is very expensive (because it
> requires
> > > integer division, which is a surprising slow). The new `eachindex`
> method
> > > in 0.4 returns an iterator to go over all the Cartesian indices very
> > > quickly.
>
>

-- 
*Sebastian Good*

Reply via email to