# Why substituting "for loop" with direct assignment of Matrix worsen the performance time?

**URL:** <https://discourse.julialang.org/t/why-substituting-for-loop-with-direct-assignment-of-matrix-worsen-the-performance-time/68601>\
**Category:** General Usage\
**Tags:** question\
**Created:** [September 22, 2021, 8:01pm UTC](https://discourse.julialang.org/t/why-substituting-for-loop-with-direct-assignment-of-matrix-worsen-the-performance-time/68601 "2021-09-22T20:01:31Z")\
**Posts on this page:** 1\
**Page:** 2

<div class="post-metadata">

**Author:** ![Amro](https://avatars.discourse-cdn.com/v4/letter/a/4491bb/32.png) [@Amro](https://discourse.julialang.org/u/Amro)\
**Post date:** [September 23, 2021, 9:08pm UTC](https://discourse.julialang.org/t/why-substituting-for-loop-with-direct-assignment-of-matrix-worsen-the-performance-time/68601/22 "2021-09-23T21:08:20Z")

</div>

> [@stillyslalom](#):
>
> Column-major matrices are contiguous along the first dimension, while row-major matrices are contiguous along the second:

@stillyslalom I got it. thank you very much for your explanation.

[Previous page](https://discourse.julialang.org/t/why-substituting-for-loop-with-direct-assignment-of-matrix-worsen-the-performance-time/68601.md?page=1)
