# Understanding and optimizing compiler time (just a bit)

**URL:** <https://discourse.julialang.org/t/understanding-and-optimizing-compiler-time-just-a-bit/51759>\
**Category:** General Usage\
**Tags:** question\
**Created:** [December 13, 2020, 12:11pm UTC](https://discourse.julialang.org/t/understanding-and-optimizing-compiler-time-just-a-bit/51759 "2020-12-13T12:11:37Z")\
**Posts on this page:** 1\
**Showing post:** 15

<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:** [January 5, 2021, 9:07am UTC](https://discourse.julialang.org/t/understanding-and-optimizing-compiler-time-just-a-bit/51759/15 "2021-01-05T09:07:35Z")

</div>

I think that happened because the original code was somewhat naively written. I am now facing the following dilemma: I want stack allocation (so, `SArray`) but no excessive specialization based on size (so, no `SArray`). Instead of continuing this discussion with a tangent, I opened a new one here:

> [@Stack-allocated arrays without excessive compilation time](https://discourse.julialang.org/t/stack-allocated-arrays-without-excessive-compilation-time/52870):
>
> I find SArray very useful because they are stack-allocated — this is important generally, but specifically for threaded code I find that minimizing allocations is a must. However, I also fine that excessive use of SArray, especially for nested types (which can be also SArrays, or ForwardDiff.Dual, etc) really taxes the compiler. I am looking for a general strategy of implementing a vector (or array, that follows easily) which can be stack-allocated, but does not generate specialized code bas…

---

_[View the full topic](https://discourse.julialang.org/t/understanding-and-optimizing-compiler-time-just-a-bit/51759)._
