What is the recommended way to iterate a matrix over rows?
The solution you listed yourself, as well as mapslices, both work fine. But if by “recommended” what you really mean is “high-performance”, then the best answer is: don’t iterate over rows. The problem is that since arrays are stored in column-major order, for anything other than a small matrix you’ll end up with a poor … Read more