Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

why does Julia uses column major? is it fast

I have read many articles on julia and its performance. but no where, i can find clue about why julia team decided to use column major for matrix operations. is it because thier way of operating on matrix fits on column major or something.

Advance thanks.

like image 596
Panna Das Avatar asked Dec 07 '17 09:12

Panna Das


1 Answers

"Multidimensional arrays in Julia are stored in column-major order. This means that arrays are stacked one column at a time. This can be verified using the vec function or the syntax [:] ..."

"This convention for ordering arrays is common in many languages like Fortran, Matlab, and R (to name a few). The alternative to column-major ordering is row-major ordering, which is the convention adopted by C and Python (numpy) among other languages."

For examples and discussion of performance differences, see the Performance Tips section of Julia's Manual.

like image 155
ShpielMeister Avatar answered Oct 20 '22 23:10

ShpielMeister