Skip to content

Instantly share code, notes, and snippets.

@StefanKarpinski
Last active March 31, 2016 16:37
Show Gist options
  • Save StefanKarpinski/2de340ab7d4560f612ebdcc0463f01bc to your computer and use it in GitHub Desktop.
Save StefanKarpinski/2de340ab7d4560f612ebdcc0463f01bc to your computer and use it in GitHub Desktop.

Arrays as Containers

Definitely 0.5:

  • Flip the switch on the concatenation deprecation (#8599)
  • Deprecate partial linear indexing (#5396, #14770)
  • ReshapedArrays (#10507, #15449, https://groups.google.com/d/msg/julia-dev/7M5qzmXIChM/kOTlGSIvAwAJ)
  • Julia native bounds checking and removal (#7799, #14474)
  • Drop dimensions indexed by a scalar (#13612)
  • Full APL slicing (#15431)

Maybe 0.5

  • Disallow indexing with extra trailing singletons?

After 0.5

  • Return slices as views (#9150).
  • Allow any index type in non-scalar indexing (#12567)

Linear Algebra

  • Transpose returns a covector or transpose type (#4774)
  • Ditch special lowering of Ac_mul_Bt, use dispatch instead. (#5332)
  • Remove default no-op behavior for (c)transpose (#13171)
@timholy
Copy link

timholy commented Mar 31, 2016

I realize I didn't spell out the connection between ReshapedArrays and linear algebra:

  • currently we dispatch to BLAS for StridedArray;
  • currently reshape(sub(A, indexes...), sz) creates a copy (returning an Array, which is Strided)
  • hence, this can be passed to BLAS

In a future world, reshape(sub(A, indexes...), sz) isn't Strided and so can't be passed to BLAS. Hence we rely on our fallbacks for linear algebra, which do indexing like A[i,j] and this will be slow.

The problems only crop up when you mix reshape and sub or slice. If A[:, 2:3] is going to not be a view in julia-0.5, this may not be sufficiently common to be a blocker.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment