# Using a Custom Length Vector type to define function Parameters

**URL:** https://discourse.julialang.org/t/using-a-custom-length-vector-type-to-define-function-parameters/116809
**Category:** Performance
**Tags:** question
**Created:** [July 9, 2024, 7:55am UTC](https://discourse.julialang.org/t/using-a-custom-length-vector-type-to-define-function-parameters/116809 "2024-07-09T07:55:19Z")
**Posts on this page:** 1
**Page:** 2

<div class="post-metadata">

### Author: ![abraemer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/abraemer/32/51403_2.png) [@abraemer](https://discourse.julialang.org/u/abraemer)
#### Post date: [July 9, 2024, 1:57pm UTC](https://discourse.julialang.org/t/using-a-custom-length-vector-type-to-define-function-parameters/116809/21 "2024-07-09T13:57:55Z")

</div>

Please note that you also benchmark the creation of the vector in this case. If you want to exclude this, then you can use interpolation:

```julia-repl
julia> @btime Particle($((1,2,3)))
julia> @btime Particle($([1,2,3]))

```

(also posting code as text enclosed in ````` is generally preferred)

[Previous page](https://discourse.julialang.org/t/using-a-custom-length-vector-type-to-define-function-parameters/116809.md?page=1)
