Since there seems to be some interest in discussing strategy for 0.5 (and not
endlessly hijacking the thread on the debugger), I'll start a new thread. I've
been pretty involved in reworking julia's AbstractArray infrastructure in the
past, and I intend to keep participating, but I'm also pretty excited about
the possibilities right now in graphics. Since there's only so much time in
the day, I'll throw out my biggest concern and see whether folks have any good
ideas and/or whether someone wants to pick up a ball and run with it.
In making the transition to defaulting to array views (SubArrays and their
future cousins), I think the insufficiently-recognized elephant in the room is
`reshape`. There seems to be quite a lot of consensus that `reshape` should
return a view rather than a copy. I've demonstrated in the past that `reshape`
does not compose in a closed fashion with `sub`, and come up with a plan for a
2nd view type currently called a ReshapedArray
(
https://github.com/JuliaLang/julia/pull/10507).
The kicker is performance. Because indexing a reshaped array often involves a
call to `div`, and `div` is dirt-slow, an alternative is highly desirable.
There are clever ways around its slowness
(
http://www.flounder.com/multiplicative_inverse.htm) and we (Simon Kornblith,
with small extensions by me) implemented these algorithms. Unfortunately, in
preliminary tests (see #10507) they are still not nearly as fast as I'd like.
I am not sure how much of this is limitations in strategy, my implementation,
poor (improvable) codegen, or just "that's how it is." It would be interesting
to benchmark against implementations like
http://libdivide.com/ and see how
we're doing.
In my opinion, this highly-focused issue is likely to result in the most
difficult decisions we have to make for Arraymagedon. If somebody wants to dive
into this and see how much can be satisfactorily resolved, it would be a big
contribution.
Best,
--Tim