
Shrirang K. answered 03/27/19
PhD in Electrical Engineering with minor in Computer Science
The benefits are purely related to performance.
If your array is stored in a row-major format and you are accessing elements row-wise, the cache of your processor will have the next elements already loaded when you need them. And after a few accesses, the pre-fetcher will kick in and start bringing in the next elements in advance. If you access elements in column-major format, you will be using only one element from a cache line, and 'wasting' the fetched elements.
Note the difference between C (and C++) and Fortran: the latter stores arrays in column-major format.
In high-performance computing applications, the code very rarely explicitly declares a multi-dimensional array. We typically declare a 1D array and translate the multiple dimensions into the right index in the code. This can lead to many optimizations, depending on what you're trying to do!