On Friday, February 05, 2016 05:24:04 PM Nitin Arora wrote:
> Thanks Tim, this is very useful. I will probably use CartesianRange now.
> 
> Is Julia 0.5 Arraypocalypse planning to address this issue as well ?

I don't think there's a way to solve this by changing our implementation of 
views; I think it's more of a compiler issue, and the fact that

julia> isbits(CartesianRange((3,5)))
true

julia> immutable ArrayWrapper{M}
           data::M
       end

julia> z = rand(5,5);

julia> isbits(ArrayWrapper(z))
false


Since I don't work on the compiler, I can't speak for what's going to happen 
there, but I'd be surprised if this changes in 0.5.

Best,
--Tim

> 
> thanks,
> Nitin
> 
> On Friday, February 5, 2016 at 3:24:34 PM UTC-8, Tim Holy wrote:
> > On Friday, February 05, 2016 08:17:21 AM Kevin Squire wrote:
> > > I think this needs to be @time bar(A).
> > 
> > Yeah, sorry for the typo.
> > 
> > > I get
> > > 
> > > julia> @time bar(A)
> > > 
> > >   0.000269 seconds (5 allocations: 176 bytes)
> > > 
> > > 20010.937886591404
> > 
> > That's just REPL allocation. Since A has 10000 columns, if this strategy
> > were
> > allocating you'd expect "10000+n allocations," where n comes from the
> > REPL.
> > 
> > --Tim

Reply via email to