# Best practice for array allocation in self-consistent calculations

**URL:** <https://discourse.julialang.org/t/best-practice-for-array-allocation-in-self-consistent-calculations/79371>\
**Category:** Performance\
**Created:** [April 12, 2022, 9:34am UTC](https://discourse.julialang.org/t/best-practice-for-array-allocation-in-self-consistent-calculations/79371 "2022-04-12T09:34:00Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![Sukera](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@Sukera](https://discourse.julialang.org/u/Sukera)\
**Post date:** [April 12, 2022, 3:39pm UTC](https://discourse.julialang.org/t/best-practice-for-array-allocation-in-self-consistent-calculations/79371/9 "2022-04-12T15:39:25Z")

</div>

If the binding is `const`, the type will be fixed, yes, but you can still have a performance impact due to the compiler not knowing whether there’s something else that _may_ access that global as well.

---

_[View the full topic](https://discourse.julialang.org/t/best-practice-for-array-allocation-in-self-consistent-calculations/79371)._
