# Forcing @inline

**URL:** https://discourse.julialang.org/t/forcing-inline/20225
**Category:** Performance
**Created:** [January 29, 2019, 10:17am UTC](https://discourse.julialang.org/t/forcing-inline/20225 "2019-01-29T10:17:52Z")
**Posts on this page:** 1
**Showing post:** 5

<div class="post-metadata">

### Author: ![maleadt](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/maleadt/32/10097_2.png) [@maleadt](https://discourse.julialang.org/u/maleadt)
#### Post date: [January 29, 2019, 2:05pm UTC](https://discourse.julialang.org/t/forcing-inline/20225/5 "2019-01-29T14:05:15Z")

</div>

> [@traktofon](#):
>
> Could you elaborate what a “concrete dispatch signature” or (from the comment linked from your link) a “maximally typed function type” is? Thanks!

There’s a reflection function:

```julia
help?> isdispatchtuple

  isdispatchtuple(T)

  Determine whether type T is a tuple "leaf type", meaning it could appear as a type signature in dispatch and has no subtypes (or supertypes) which could appear in a call

julia> isdispatchtuple(Tuple{Int})
true

julia> isdispatchtuple(Tuple{Any})
false

```

The latter occurs when the call to your function is badly typed:

```julia
julia> foo(x) = x
julia> bar(x) = foo(first(x))

julia> code_warntype(bar, Tuple{Vector{Int}})
Body::Int64
1 1 ─ ...
  │ %5 = invoke Main.foo(%4::Int64)::Int64
  └── return %5

julia> code_warntype(bar, Tuple{Vector{Any}})
Body::Any
1 1 ─ ...
  │ %5 = (Main.foo)(%4::Any)::Any
  └── return %5

```

In that case, doing dynamic dispatch will compile a specialized version for the concrete run-time types which is typically faster (ie. the function barrier pattern).

---

_[View the full topic](https://discourse.julialang.org/t/forcing-inline/20225)._
