# Common allocation mistakes

**URL:** <https://discourse.julialang.org/t/common-allocation-mistakes/66127>\
**Category:** Performance\
**Tags:** memory-allocation\
**Created:** [August 10, 2021, 12:08pm UTC](https://discourse.julialang.org/t/common-allocation-mistakes/66127 "2021-08-10T12:08:19Z")\
**Posts on this page:** 1\
**Showing post:** 15

<div class="post-metadata">

**Author:** ![amrods](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/amrods/32/2543_2.png) [@amrods](https://discourse.julialang.org/u/amrods)\
**Post date:** [August 11, 2021, 1:21am UTC](https://discourse.julialang.org/t/common-allocation-mistakes/66127/15 "2021-08-11T01:21:24Z")

</div>

I’ve tried using `LoopVectorization` [before](https://discourse.julialang.org/t/how-to-speed-up-these-functions/65728/19) and I found it “brittle”. I think I will focus for now on avoiding allocations.

Another thing is that I am afraid that `StaticArrays` does not work with `ForwardDiff` or `ComponentArrays`. I am especially worried about abandoning `ComponentArrays`. I program complex models with many parts and trying different functional forms etc, and `ComponentArrays` saves me a lot of manual tinkering with large vectors of parameters.

---

_[View the full topic](https://discourse.julialang.org/t/common-allocation-mistakes/66127)._
