# Adding parameters to function definition avoids allocations

**URL:** <https://discourse.julialang.org/t/adding-parameters-to-function-definition-avoids-allocations/89975>\
**Category:** Performance\
**Created:** [November 9, 2022, 11:57am UTC](https://discourse.julialang.org/t/adding-parameters-to-function-definition-avoids-allocations/89975 "2022-11-09T11:57:13Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![user664303](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/user664303/32/37843_2.png) [@user664303](https://discourse.julialang.org/u/user664303)\
**Post date:** [November 9, 2022, 3:43pm UTC](https://discourse.julialang.org/t/adding-parameters-to-function-definition-avoids-allocations/89975/4 "2022-11-09T15:43:32Z")

</div>

I’ve now created a working MWE and posted it [here](https://discourse.julialang.org/t/impact-of-specifying-input-types-on-function-performance-when-referencing-arguments-from-vector-any/89993).

---

_[View the full topic](https://discourse.julialang.org/t/adding-parameters-to-function-definition-avoids-allocations/89975)._
