# Calling a simple method with unused type parameters unexpectedly allocates memory

**URL:** <https://discourse.julialang.org/t/calling-a-simple-method-with-unused-type-parameters-unexpectedly-allocates-memory/59050>\
**Category:** Performance\
**Tags:** memory-allocation, parametric-types\
**Created:** [April 11, 2021, 7:34pm UTC](https://discourse.julialang.org/t/calling-a-simple-method-with-unused-type-parameters-unexpectedly-allocates-memory/59050 "2021-04-11T19:34:06Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![maxfreu](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/maxfreu/32/17468_2.png) [@maxfreu](https://discourse.julialang.org/u/maxfreu)\
**Post date:** [April 12, 2021, 9:54am UTC](https://discourse.julialang.org/t/calling-a-simple-method-with-unused-type-parameters-unexpectedly-allocates-memory/59050/5 "2021-04-12T09:54:54Z")

</div>

This [discussion](https://discourse.julialang.org/t/unused-where-t-causes-a-function-to-become-very-slow/39727) and this [issue](https://github.com/JuliaLang/julia/issues/29393) _might_ be related, but they are about completely _unused_ type parameters, whereas your type parameters are all attached to the args.

However I’d say it’s good practice to boil these annotations down to the absolute minimum you need for dispatch.

---

_[View the full topic](https://discourse.julialang.org/t/calling-a-simple-method-with-unused-type-parameters-unexpectedly-allocates-memory/59050)._
