# Docs on parse-time, compile-time and run-time operations?

**URL:** https://discourse.julialang.org/t/docs-on-parse-time-compile-time-and-run-time-operations/4955
**Category:** General Usage
**Created:** [July 19, 2017, 8:37pm UTC](https://discourse.julialang.org/t/docs-on-parse-time-compile-time-and-run-time-operations/4955 "2017-07-19T20:37:19Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![mohamed82008](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mohamed82008/32/18171_2.png) [@mohamed82008](https://discourse.julialang.org/u/mohamed82008)
#### Post date: [July 19, 2017, 8:37pm UTC](https://discourse.julialang.org/t/docs-on-parse-time-compile-time-and-run-time-operations/4955/1 "2017-07-19T20:37:19Z")

</div>

Are there any references that explain what happens exactly at parse-time, compile-time and run-time inside of Julia for someone who is curious but without all the in-depth background? Something along the lines of the following talk. I would love to understand Julia better to hopefully reach a point where I don’t have to keep watching my back when programming! It seems that the docs mention run-time and compile-time every now and then, but no section clearly details everything happening behind the scenes.

[![](https://global.discourse-cdn.com/julialang/original/3X/9/c/9c7dcad2631cec7ff3a22f67682c60b013a07c63.jpeg "JuliaCon 2017 | AoT or JIT: How Does Julia Work? | Jameson Nash") ](https://www.youtube.com/watch?v=7KGZ_9D_DbI)

---

<div class="post-metadata">

### Author: ![mohamed82008](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mohamed82008/32/18171_2.png) [@mohamed82008](https://discourse.julialang.org/u/mohamed82008)
#### Post date: [July 19, 2017, 9:22pm UTC](https://discourse.julialang.org/t/docs-on-parse-time-compile-time-and-run-time-operations/4955/2 "2017-07-19T21:22:54Z")

</div>

Another nice article on some internals. [https://juliacomputing.com/blog/2016/02/09/static-julia.html](https://juliacomputing.com/blog/2016/02/09/static-julia.html)

---

<div class="post-metadata">

### Author: ![ihnorton](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ihnorton/32/26_2.png) [@ihnorton](https://discourse.julialang.org/u/ihnorton)
#### Post date: [July 20, 2017, 1:40am UTC](https://discourse.julialang.org/t/docs-on-parse-time-compile-time-and-run-time-operations/4955/3 "2017-07-20T01:40:56Z")

</div>

Some of the details here have changed, but the major gist is still valid:

[![](https://global.discourse-cdn.com/julialang/original/3X/2/8/28f21d6233532483e18217b2a719ea96d4b210ae.jpeg "Introduction to Julia Internals") ](https://www.youtube.com/watch?v=osdeT-tWjzk)

---

<div class="post-metadata">

### Author: ![mohamed82008](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mohamed82008/32/18171_2.png) [@mohamed82008](https://discourse.julialang.org/u/mohamed82008)
#### Post date: [July 20, 2017, 1:43am UTC](https://discourse.julialang.org/t/docs-on-parse-time-compile-time-and-run-time-operations/4955/4 "2017-07-20T01:43:28Z")

</div>

Here is another intuitive explanation of what’s going on under the hood, explaining generated functions and exposing Julia’s pipeline in the process.

[![](https://global.discourse-cdn.com/julialang/original/3X/4/1/41897817fe951502a54483d44804152cd2218ab8.jpeg "Jake Bolewski: Staged programming in Julia") ](https://www.youtube.com/watch?v=KAN8zbM659o)

---

<div class="post-metadata">

### Author: ![mohamed82008](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mohamed82008/32/18171_2.png) [@mohamed82008](https://discourse.julialang.org/u/mohamed82008)
#### Post date: [July 20, 2017, 2:24am UTC](https://discourse.julialang.org/t/docs-on-parse-time-compile-time-and-run-time-operations/4955/5 "2017-07-20T02:24:14Z")

</div>

Awesome!

---

<div class="post-metadata">

### Author: ![mohamed82008](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mohamed82008/32/18171_2.png) [@mohamed82008](https://discourse.julialang.org/u/mohamed82008)
#### Post date: [July 20, 2017, 2:42am UTC](https://discourse.julialang.org/t/docs-on-parse-time-compile-time-and-run-time-operations/4955/6 "2017-07-20T02:42:25Z")

</div>

Just one additional question, it seems that the concepts of parse-time, run-time and compile-time are a bit cyclic rather than being fixed points in a process. If I understand correctly, parsing changes the file to an AST which is then transformed and optimized in multiple ways before attempting type inference. After type inference, if generated functions exist, they will be unwrapped (more parsing work I suppose) and then code is generated and statically (?) compiled by LLVM for the specific types of the parameters passed at run-time (?) which then get cached for later quick use. So at the last bit, it seems that parsing, compiling and running are taking place somewhat simultaneously or in a very tight window, so where would you place markers for the parse-time, compile-time and run-time points in this process? Please excuce my ignorance of these concepts that you might take for granted.

Edited to add: well I suppose a lot more optimizations happen after type inference to only compile relevant pieces of the code making use of features such as traits and if statements that specialize the behaviour for different data types. And if you don’t mind another question, where does pre-compilation fall in this process, is it perhaps everything before type inference?

---

<div class="post-metadata">

### Author: ![mohamed82008](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mohamed82008/32/18171_2.png) [@mohamed82008](https://discourse.julialang.org/u/mohamed82008)
#### Post date: [August 21, 2018, 4:51am UTC](https://discourse.julialang.org/t/docs-on-parse-time-compile-time-and-run-time-operations/4955/7 "2018-08-21T04:51:12Z")

</div>

Some more insights: [JuliaCon 2018 | Engineering Julia for Speed | Lionel Zoubritzky - YouTube](https://www.youtube.com/watch?v=XWIZ_dCO6X8)
