# Force specialization on varargs when the arguments are not all of the same concrete type

**URL:** <https://discourse.julialang.org/t/force-specialization-on-varargs-when-the-arguments-are-not-all-of-the-same-concrete-type/34788>\
**Category:** Performance\
**Created:** [February 18, 2020, 6:18am UTC](https://discourse.julialang.org/t/force-specialization-on-varargs-when-the-arguments-are-not-all-of-the-same-concrete-type/34788 "2020-02-18T06:18:13Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![dilumaluthge](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dilumaluthge/32/29283_2.png) [@dilumaluthge](https://discourse.julialang.org/u/dilumaluthge)\
**Post date:** [February 18, 2020, 7:05am UTC](https://discourse.julialang.org/t/force-specialization-on-varargs-when-the-arguments-are-not-all-of-the-same-concrete-type/34788/5 "2020-02-18T07:05:20Z")

</div>

On a separate note, I have an analogous question about forcing specialization on keyword arguments:

> [@Force specialization on kwargs](https://discourse.julialang.org/t/force-specialization-on-kwargs/34789):
>
> If I have a function like this: f\_vararg(varargs::Int...) = tuple(varargs...) I can force specialization on varargs with either of the following: g\_vararg(varargs::Vararg{Int, N}) where {N} = tuple(varargs...) h\_vararg(varargs::Vararg{\<:Any, N}) where {N} = tuple(varargs...) Now suppose instead that I have a function like this: f\_kwarg(; kwargs...) = (; kwargs...) How can I force specialization on the keyword arguments?

---

_[View the full topic](https://discourse.julialang.org/t/force-specialization-on-varargs-when-the-arguments-are-not-all-of-the-same-concrete-type/34788)._
