# Reordering for memory contiguity/memory access

**URL:** <https://discourse.julialang.org/t/reordering-for-memory-contiguity-memory-access/43040>\
**Category:** Numerics\
**Tags:** question\
**Created:** [July 14, 2020, 12:42pm UTC](https://discourse.julialang.org/t/reordering-for-memory-contiguity-memory-access/43040 "2020-07-14T12:42:21Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [July 14, 2020, 3:44pm UTC](https://discourse.julialang.org/t/reordering-for-memory-contiguity-memory-access/43040/3 "2020-07-14T15:44:19Z")

</div>

Thanks, that could improve things (also, I did not realize that the proper term is _data locality_). I found [this topic](https://discourse.julialang.org/t/implementing-cuthill-mckee/9268/) which mentions some packages implementing Cluthill-McKee, but I am unsure which one of those would make it easiest to extract the permutation itself.

Also, I am wondering if instead of specifying targets in `patterns`, I should instead specify “sources” — ie effectively the sparsity pattern of the transpose. That would allow me to parallelize the outer loop without worrying about concurrent writes.

---

_[View the full topic](https://discourse.julialang.org/t/reordering-for-memory-contiguity-memory-access/43040)._
