# Naming positional arguments at call site

**URL:** https://discourse.julialang.org/t/naming-positional-arguments-at-call-site/103526
**Category:** Internals & Design
**Created:** [September 4, 2023, 7:07pm UTC](https://discourse.julialang.org/t/naming-positional-arguments-at-call-site/103526 "2023-09-04T19:07:20Z")
**Posts on this page:** 1
**Showing post:** 73

<div class="post-metadata">

### Author: ![mcabbott](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mcabbott/32/6603_2.png) [@mcabbott](https://discourse.julialang.org/u/mcabbott)
#### Post date: [September 5, 2023, 6:59pm UTC](https://discourse.julialang.org/t/naming-positional-arguments-at-call-site/103526/73 "2023-09-05T18:59:03Z")

</div>

> [@goerz](#):
>
> but it can also come at a performance cost

> [@ParadaCarleton](#):
>
> people just default to positional arguments (because keywords are slower).

Is this true? Certainly Julia 0.6 or something had slow keywords, but I think that (in almost all cases?) this was fixed long ago.

All the examples [here](https://discourse.julialang.org/t/performance-of-typed-keyword-arguments/11579/) show no cost for me. As do simple tests… including ones which rely on constant propagation:

```julia
julia> fun(; x, y) = fun(x, y); fun(x, y) = /(x, y); # very simple fast function

julia> @btime fun(x=$1, y=$2); @btime fun($1, $2);
  min 2.500 ns, mean 2.610 ns (0 allocations)
  min 2.458 ns, mean 2.583 ns (0 allocations)

julia> tup(n) = sum(ntuple(i -> i^2, n)); tup(; n) = tup(n);

julia> @btime tup(5); @btime tup($5); @btime tup(n = 5); @btime tup(n = $5);
  min 0.875 ns, mean 0.957 ns (0 allocations)
  min 15.071 ns, mean 15.269 ns (0 allocations)
  min 0.834 ns, mean 0.957 ns (0 allocations)
  min 15.071 ns, mean 15.306 ns (0 allocations)

julia> @code_warntype tup(5) # Tuple{Vararg{Int64}}, without constant propagation!

```

---

_[View the full topic](https://discourse.julialang.org/t/naming-positional-arguments-at-call-site/103526)._
