# Compilation performance. Branching

**URL:** https://discourse.julialang.org/t/compilation-performance-branching/17973
**Category:** Performance
**Created:** [November 25, 2018, 11:12am UTC](https://discourse.julialang.org/t/compilation-performance-branching/17973 "2018-11-25T11:12:30Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)
#### Post date: [November 25, 2018, 12:18pm UTC](https://discourse.julialang.org/t/compilation-performance-branching/17973/2 "2018-11-25T12:18:20Z")

</div>

First, please [quote your code](https://discourse.julialang.org/t/psa-how-to-quote-code-with-backticks/7530).

I your problem truly has this simple structure, then I would guess that compile time would be dominated by O(1) factors; since there is nothing to infer. Also, a global `A` may be the source of most of your performance problems at runtime.

But why aren’t you using something like

```julia
(kwarg1 || kwarg2 || ...) ? A : nothing

```

or even

```julia
dummy(; kwargs...) = any(values(kwargs)) ? A : nothing

```

---

_[View the full topic](https://discourse.julialang.org/t/compilation-performance-branching/17973)._
