# How can I tell if a compilation is happening?

**URL:** https://discourse.julialang.org/t/how-can-i-tell-if-a-compilation-is-happening/41292
**Category:** General Usage
**Created:** [June 12, 2020, 6:48pm UTC](https://discourse.julialang.org/t/how-can-i-tell-if-a-compilation-is-happening/41292 "2020-06-12T18:48:19Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![miak](https://avatars.discourse-cdn.com/v4/letter/m/87869e/32.png) [@miak](https://discourse.julialang.org/u/miak)
#### Post date: [June 12, 2020, 6:48pm UTC](https://discourse.julialang.org/t/how-can-i-tell-if-a-compilation-is-happening/41292/1 "2020-06-12T18:48:19Z")

</div>

If I have a type `struct Foo{N} end` and `N` is intended to be a value, do methods on `Foo{N} where N` get compiled for each _value_ of `N` or each _type_? For example, if I have a function `foo_stuff(f::Foo{N}) where {N}` and I call it with a `Foo{Int(6)}`, a `Foo{Int8(6)}` and a `Foo{Int(5)}`, do I get two separately compiled versions or three?

---

<div class="post-metadata">

### Author: ![Oscar\_Smith](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oscar_smith/32/25343_2.png) [@Oscar\_Smith](https://discourse.julialang.org/u/Oscar_Smith)
#### Post date: [June 12, 2020, 6:56pm UTC](https://discourse.julialang.org/t/how-can-i-tell-if-a-compilation-is-happening/41292/2 "2020-06-12T18:56:48Z")

</div>

You get 3. The parameter of a type is part of the type, so each different parameter value will be compiled differently. If you don’t want this, you probably don’t want to parametrize `Foo` on `N`.

---

<div class="post-metadata">

### Author: ![miak](https://avatars.discourse-cdn.com/v4/letter/m/87869e/32.png) [@miak](https://discourse.julialang.org/u/miak)
#### Post date: [June 12, 2020, 6:57pm UTC](https://discourse.julialang.org/t/how-can-i-tell-if-a-compilation-is-happening/41292/3 "2020-06-12T18:57:24Z")

</div>

Thanks! That makes sense.
