# Questions about Compiler and Compiling Modules

**URL:** https://discourse.julialang.org/t/questions-about-compiler-and-compiling-modules/19591
**Category:** New to Julia
**Created:** [January 13, 2019, 5:55pm UTC](https://discourse.julialang.org/t/questions-about-compiler-and-compiling-modules/19591 "2019-01-13T17:55:41Z")
**Posts on this page:** 1
**Showing post:** 17

<div class="post-metadata">

### Author: ![sdanisch](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sdanisch/32/1406_2.png) [@sdanisch](https://discourse.julialang.org/u/sdanisch)
#### Post date: [January 16, 2019, 10:54am UTC](https://discourse.julialang.org/t/questions-about-compiler-and-compiling-modules/19591/17 "2019-01-16T10:54:32Z")

</div>

> Should it not be precompiled already?

Yes and no! Julia consist of multiple compilation stages:  
`parsing -> lowering -> type inference -> LLVM IR -> native code`.

The first 2 (maybe partly 3 if all types are fixed) are done during what we call `precompilation`.  
The last three only happen when you call a function.

```julia
using StaticArrays # precompiled
m = @SMatrix rand(3, 3)
@profiler inv(m) # lots of calls to type inference

```

---

_[View the full topic](https://discourse.julialang.org/t/questions-about-compiler-and-compiling-modules/19591)._
