Another very very interesting optimisation can be found in these lecture slides [0]. (Scroll to slide 28, although the entire slide deck is amazing)
[0]: https://ocw.mit.edu/courses/electrical-engineering-and-compu...
[0]: https://ocw.mit.edu/courses/electrical-engineering-and-compu...
I knew that the striding order benefits would only work on voxel data similar to the data I was testing on, and I wanted to generalize it so that it could be configured dynamically so each dataset could use the best striding order for that particular data. I tried setting up numpy ndarray so that you could configure the memory striding order independently of the array indices so that my code wouldn't have to change if the striding order changed, but I could never get it to work and unfortunately I wasn't able to convince numpy folks I interacted with that this feature would be helpful.