Why is Julia using a column? it's fast

I read many articles about Julia and her performance. but no where can I find a hint about why the julia team decided to use columns for matrix operations. this is because the way the matrix works is suitable for a column or something else.

Thanks.

+5
source share
1 answer

"Multidimensional arrays in Julia are stored in the main column order, which means that arrays stack one column at a time. This can be checked using the vec function or the [:] syntax ..."

β€œThis convention for arranging arrays is common in many languages, such as Fortran, Matlab, and R (for multiple). The alternative to arranging columns is row order, which is the convention accepted by C and Python (numpy) among other languages.

for examples and discussion of performance differences https://docs.julialang.org/en/latest/manual/performance-tips/

0
source

Source: https://habr.com/ru/post/1273916/


All Articles