Row-major Order

In computing, row-major order and column-major order describe methods for storing multidimensional arrays in linear memory. Following standard matrix notation, rows are numbered by the first index of a two-dimensional array and columns by the second index. Array layout is critical for correctly passing arrays between programs written in different languages. It is also important for performance when traversing an array because accessing array elements that are contiguous in memory is usually faster than accessing elements which are not, due to caching.

Row-major order is used in C, PL/I, Python and others. Column-major order is used in Fortran, MATLAB, GNU Octave, R, Rasdaman, X10 and Scilab.

Read more about Row-major Order:  Row-major Order, Column-major Order, Generalization To Higher Dimensions

Famous quotes containing the word order:

    In schools all over the world, little boys learn that their country is the greatest in the world, and the highest honor that could befall them would be to defend it heroically someday. The fact that empathy has traditionally been conditioned out of boys facilitates their obedience to leaders who order them to kill strangers.
    Myriam Miedzian, U.S. author. Boys Will Be Boys, ch. 3 (1991)