# Unexpected allocations when passing types as arguments

**URL:** <https://discourse.julialang.org/t/unexpected-allocations-when-passing-types-as-arguments/131230>\
**Category:** Performance\
**Created:** [July 31, 2025, 2:30am UTC](https://discourse.julialang.org/t/unexpected-allocations-when-passing-types-as-arguments/131230 "2025-07-31T02:30:07Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![mikmoore](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mikmoore/32/31109_2.png) [@mikmoore](https://discourse.julialang.org/u/mikmoore)\
**Post date:** [July 31, 2025, 2:18pm UTC](https://discourse.julialang.org/t/unexpected-allocations-when-passing-types-as-arguments/131230/8 "2025-07-31T14:18:26Z")

</div>

> [@eldee](#):
>
> `@code_warntype` and `@code_llvm`

Note that these macros will show fully specialized code that is not always what is actually used [#32834](https://github.com/JuliaLang/julia/issues/32834) because of the above-mentioned performance tip regarding non-specialization, so take them with a grain of salt.

Tangent: [Be less aware of when Julia avoids specializing?](https://discourse.julialang.org/t/be-less-aware-of-when-julia-avoids-specializing/109111) and [#51423](https://github.com/JuliaLang/julia/issues/51423).

---

_[View the full topic](https://discourse.julialang.org/t/unexpected-allocations-when-passing-types-as-arguments/131230)._
