# Seemingly unnecessary allocation within for loop

**URL:** <https://discourse.julialang.org/t/seemingly-unnecessary-allocation-within-for-loop/72556>\
**Category:** Performance\
**Tags:** memory-allocation, loops, cartesianindices\
**Created:** [December 4, 2021, 12:20am UTC](https://discourse.julialang.org/t/seemingly-unnecessary-allocation-within-for-loop/72556 "2021-12-04T00:20:09Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![ptoche](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ptoche/32/23554_2.png) [@ptoche](https://discourse.julialang.org/u/ptoche)\
**Post date:** [December 4, 2021, 8:59pm UTC](https://discourse.julialang.org/t/seemingly-unnecessary-allocation-within-for-loop/72556/9 "2021-12-04T20:59:03Z")

</div>

Wow. Thanks for sharing!

For reference, pages 128-129 on “overlap regions” in chapter 5 of _Principles of Parallel Programming_ by Lin and Snyder, which you refer to in a related thread (as JPGs because discourse does not allow me to post PDF):

 ![Lin-Snyder-Overlapping-Regions-128](https://global.discourse-cdn.com/julialang/original/3X/6/d/6d35bc9ca78cf4702cb573860be59c97503eac74.jpeg)  
 ![Lin-Snyder-Overlapping-Regions-129](https://global.discourse-cdn.com/julialang/original/3X/a/f/af3237782cff9949f4cd105fbffc29345ade9f77.jpeg)

---

_[View the full topic](https://discourse.julialang.org/t/seemingly-unnecessary-allocation-within-for-loop/72556)._
