The suggestions in the previous sections should make your array code fast and high performance. If you are directly writing code to solve your own problems, this should be enough. However, if you are writing library routines that may be called by other programs, you will need to heed additional concerns. Your function may be called with arrays of different kinds and with different dimensions. To write generic code that is fast with all custom types built-in, and for arrays of many dimensions, you need to be careful in how you iterate over the elements of the arrays.
All Julia arrays are subtypes of the AbstractArray type. All abstract arrays must provide facilities for indexation and iteration. However, these can be implemented very differently for different types of arrays. The default array is DenseArray, which stores its elements...