News for hackers. Stuff that matters.
Re:A 100x speedup with unsafe Python by sdeer on Monday May 06, 2024 @11:31PM (#40282087)
Probably because Fortran stores matrices and other multidimensional arrays in column order. Traditionally most numerical computation software was written in Fortran and numpy calls those under the hood. Storing in row order would have meant copying the data to column major order and back for any call to Fortran.
Re:A 100x speedup with unsafe Python by Thrymr on Tuesday May 07, 2024 @11:21AM (#40286797)
NumPy can _store_ arrays in either row-major (C-style) or column-major (Fortran-style) order. Row-major is the default. Index order is always row, column.